:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --indigo: #4f46e5;
    --purple: #7c3aed;
    --amber: #f59e0b;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #f5f7fb;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    backdrop-filter: blur(18px);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.logo-text {
    font-size: 1.15rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-nav a {
    padding: 10px 16px;
    color: #334155;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--blue);
    background: #eff6ff;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #0f172a;
    border-radius: 99px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background:
        radial-gradient(circle at 12% 20%, rgba(37, 99, 235, 0.14), transparent 30%),
        radial-gradient(circle at 85% 12%, rgba(124, 58, 237, 0.16), transparent 34%),
        linear-gradient(135deg, #eff6ff 0%, #eef2ff 48%, #faf5ff 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
}

.hero-shell {
    position: relative;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    align-items: center;
    gap: 40px;
    padding: 56px 0;
}

.hero-slider {
    position: relative;
}

.hero-slide {
    display: none;
    animation: fadeUp 0.55s ease both;
}

.hero-slide.active {
    display: block;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--blue);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    max-width: 720px;
    margin: 18px 0 0;
    font-size: clamp(2.4rem, 6vw, 4.35rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.hero-title-accent {
    display: block;
    margin-top: 8px;
    color: var(--blue);
}

.hero-copy {
    max-width: 660px;
    margin: 22px 0 0;
    color: #475569;
    font-size: clamp(1.02rem, 2vw, 1.22rem);
}

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

.hero-tags span,
.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #1e3a8a;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 650;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 750;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 20px 38px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    color: var(--blue);
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(37, 99, 235, 0.28);
}

.hero-media {
    position: relative;
}

.hero-poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    transform: rotate(1.2deg);
}

.hero-poster-link:hover img {
    transform: scale(1.05);
}

.hero-poster-link img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    transition: transform 0.5s ease;
}

.hero-poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.78));
}

.hero-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.22);
}

.hero-media-text {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    z-index: 3;
    color: #ffffff;
}

.hero-media-text strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1.2;
}

.hero-media-text span {
    display: inline-flex;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.9);
    font-size: 0.86rem;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(37, 99, 235, 0.28);
}

.hero-dot.active {
    width: 30px;
    background: var(--blue);
}

.section {
    padding: 64px 0;
}

.section.white {
    background: #ffffff;
}

.section.soft {
    background: #f8fafc;
}

.section.gradient {
    background: linear-gradient(135deg, #eef2ff, #eff6ff 55%, #faf5ff);
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--blue);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.55rem);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 24px 48px rgba(37, 99, 235, 0.14);
}

.category-card h3 {
    margin: 0;
    font-size: 1.22rem;
}

.category-card p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 0.94rem;
}

.category-card span {
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: var(--blue);
    font-weight: 800;
}

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 28px 58px rgba(15, 23, 42, 0.16);
}

.movie-card.is-hidden,
.rank-row.is-hidden {
    display: none;
}

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.58));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    max-width: calc(100% - 20px);
    padding: 4px 8px;
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-left {
    left: 10px;
    background: var(--blue);
}

.badge-right {
    right: 10px;
    background: rgba(15, 23, 42, 0.78);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    min-height: 44px;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info p {
    min-height: 44px;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.86rem;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #64748b;
    font-size: 0.8rem;
}

.meta-line span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.tag-row span {
    min-height: 24px;
    padding: 4px 8px;
    color: #475569;
    background: #f1f5f9;
    font-size: 0.76rem;
    font-weight: 650;
}

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

.feature-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.feature-card a {
    display: block;
}

.feature-poster {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #dbeafe;
}

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

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

.feature-rank {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.feature-body {
    padding: 20px;
}

.feature-body h3 {
    margin: 0;
    font-size: 1.14rem;
}

.feature-body p {
    margin: 10px 0 0;
    color: #64748b;
}

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

.rank-row {
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.rank-row-link {
    display: grid;
    grid-template-columns: 52px 126px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
}

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

.rank-row img {
    width: 126px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
    background: #dbeafe;
}

.rank-row-main h3 {
    margin: 0;
    font-size: 1.05rem;
}

.rank-row-main p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.92rem;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.heat-pill {
    padding: 8px 12px;
    color: #b45309;
    background: #fef3c7;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
    color: #64748b;
}

.search-box span {
    font-weight: 800;
    color: #334155;
}

.search-box input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-weight: 750;
}

.sort-button.active,
.sort-button:hover {
    color: #ffffff;
    background: var(--blue);
}

.page-hero {
    padding: 52px 0 42px;
    background: linear-gradient(135deg, #eff6ff, #eef2ff 60%, #faf5ff);
}

.page-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #475569;
    font-size: 1.06rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #64748b;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--blue);
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.detail-card,
.side-card {
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.detail-card {
    overflow: hidden;
}

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

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

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.28), rgba(2, 6, 23, 0.68));
    transition: opacity 0.2s ease;
}

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

.play-button {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
    font-size: 2rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.08);
    background: #ffffff;
}

.detail-body {
    padding: 28px;
}

.detail-body h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.55rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.detail-section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 1.28rem;
}

.detail-section p {
    margin: 0;
    color: #475569;
    text-align: justify;
}

.review-box {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 1.18rem;
}

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

.side-item {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.side-item:hover {
    background: #f8fafc;
}

.side-item img {
    width: 104px;
    height: 68px;
    object-fit: cover;
    border-radius: 12px;
    background: #dbeafe;
}

.side-item h3 {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.38;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-item p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.78rem;
}

.site-footer {
    padding: 38px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-shell p {
    margin: 6px 0 0;
    color: #94a3b8;
}

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

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .hero-shell {
        grid-template-columns: 1fr;
        padding: 34px 0 52px;
    }

    .hero,
    .hero-shell {
        min-height: auto;
    }

    .hero-poster-link {
        transform: none;
    }

    .section-head,
    .filter-panel,
    .footer-shell {
        align-items: stretch;
        flex-direction: column;
    }

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

    .rank-row img {
        width: 92px;
        height: 64px;
    }

    .heat-pill {
        grid-column: 2 / 4;
        justify-self: start;
    }
}

@media (max-width: 700px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        border-radius: 12px;
    }

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

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

    .hero-poster-link img {
        height: 360px;
    }

    .detail-body {
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

    .btn {
        width: 100%;
    }

    .movie-info h3 {
        font-size: 0.92rem;
    }

    .side-item {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .side-item img {
        width: 88px;
        height: 62px;
    }
}
