:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-400: #38bdf8;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --accent-500: #f97316;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--gray-50);
    color: var(--gray-900);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / 0.94);
    border-bottom: 1px solid var(--gray-200);
    backdrop-filter: blur(12px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--gray-900);
}

.brand-mark {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    color: var(--white);
    font-size: 15px;
    box-shadow: 0 10px 20px rgb(2 132 199 / 0.25);
}

.brand-text {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link,
.mobile-link {
    color: var(--gray-700);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--primary-600);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 9px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--gray-700);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

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

.mobile-link {
    padding: 10px 12px;
    border-radius: 10px;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: var(--primary-50);
}

.page-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 72px;
}

.page-top {
    padding-top: 32px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--gray-200);
    box-shadow: var(--shadow-xl);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgb(0 0 0 / 0.88), rgb(0 0 0 / 0.48), rgb(0 0 0 / 0.08));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 5vw, 64px);
    bottom: clamp(32px, 8vw, 80px);
    max-width: 680px;
    color: var(--white);
}

.hero-kicker,
.category-chip,
.pill-row span,
.label-new {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-kicker {
    margin-bottom: 14px;
    padding: 6px 14px;
    background: var(--primary-600);
    font-size: 14px;
}

.hero-content h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 18px;
    max-width: 650px;
}

.hero-actions,
.featured-meta,
.detail-meta,
.card-meta,
.pill-row,
.footer-links,
.category-strip,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    background: var(--primary-600);
    color: var(--white);
}

.primary-button:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.ghost-button {
    background: rgb(255 255 255 / 0.12);
    color: var(--white);
    border: 1px solid rgb(255 255 255 / 0.36);
    backdrop-filter: blur(4px);
}

.ghost-button:hover {
    background: rgb(255 255 255 / 0.2);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgb(0 0 0 / 0.5);
    color: var(--white);
    font-size: 40px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgb(0 0 0 / 0.72);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.category-strip {
    margin: 28px 0 0;
}

.category-strip a {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--white);
    color: var(--gray-700);
    font-weight: 700;
    box-shadow: var(--shadow-md);
    transition: color 0.2s ease, transform 0.2s ease;
}

.category-strip a:hover {
    color: var(--primary-600);
    transform: translateY(-2px);
}

.section-block {
    margin-top: 64px;
}

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

.section-heading h2,
.page-hero h1,
.detail-heading h1 {
    margin: 0;
    color: var(--gray-900);
    line-height: 1.15;
}

.section-heading h2 {
    font-size: 28px;
}

.section-heading p,
.page-hero p,
.category-info p,
.card-body p,
.detail-section p,
.site-footer p {
    color: var(--gray-600);
}

.section-heading p {
    margin: 8px 0 0;
}

.text-link {
    flex-shrink: 0;
    color: var(--primary-600);
    font-weight: 800;
}

.text-link:hover {
    color: var(--primary-700);
}

.soft-panel {
    padding: 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-50), #eef2ff);
}

.label-new {
    padding: 6px 12px;
    background: var(--white);
    color: var(--primary-600);
    box-shadow: var(--shadow-md);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin: 24px 0;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.search-input,
.filter-select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--gray-50);
    color: var(--gray-900);
    outline: none;
}

.search-input {
    padding: 0 18px;
}

.filter-select {
    padding: 0 14px;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px rgb(56 189 248 / 0.16);
}

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

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

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

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

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

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--gray-200);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgb(0 0 0 / 0.58), transparent 55%);
    transition: opacity 0.25s ease;
}

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

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

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

.rating-badge,
.category-badge {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    color: var(--white);
    font-weight: 800;
    font-size: 12px;
}

.rating-badge {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: rgb(0 0 0 / 0.72);
    backdrop-filter: blur(4px);
}

.category-badge {
    left: 10px;
    bottom: 10px;
    padding: 3px 8px;
    background: var(--primary-600);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.card-link:hover h3 {
    color: var(--primary-600);
}

.card-body p {
    min-height: 40px;
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    justify-content: space-between;
    color: var(--gray-500);
    font-size: 13px;
}

.featured-card {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--gray-900);
    box-shadow: var(--shadow-xl);
}

.featured-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.featured-card:hover img {
    transform: scale(1.04);
}

.featured-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgb(0 0 0 / 0.96), rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.04));
}

.featured-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: clamp(32px, 6vw, 72px);
    color: var(--white);
}

.pill-row span {
    padding: 6px 12px;
    background: var(--primary-600);
    color: var(--white);
    font-size: 13px;
}

.pill-row span:first-child {
    background: var(--accent-500);
}

.featured-content h2 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.featured-meta {
    margin-bottom: 18px;
    color: #e5e7eb;
    font-weight: 700;
}

.featured-content p {
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: 18px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 72px minmax(0, 1fr);
    grid-template-areas: "num img title" "num img meta";
    align-items: center;
    gap: 6px 14px;
    min-height: 88px;
    padding: 10px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.rank-number {
    grid-area: num;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 20px;
    font-weight: 900;
}

.rank-row img {
    grid-area: img;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--gray-200);
}

.rank-title {
    grid-area: title;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-meta {
    grid-area: meta;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero {
    padding: 44px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: var(--white);
    box-shadow: var(--shadow-xl);
}

.small-hero h1 {
    color: var(--white);
    font-size: clamp(32px, 4vw, 48px);
}

.small-hero p {
    max-width: 820px;
    margin: 14px 0 0;
    color: #e0f2fe;
    font-size: 17px;
}

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

.category-card a {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    min-height: 220px;
    padding: 18px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-thumbs img {
    width: 100%;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--gray-200);
}

.category-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.category-info h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-info p {
    margin: 0 0 18px;
}

.category-info span {
    color: var(--primary-600);
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

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

.detail-layout {
    margin-top: 0;
}

.player-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--black);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background: linear-gradient(to top, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0.15));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-600);
    box-shadow: 0 22px 45px rgb(2 132 199 / 0.34);
    font-size: 34px;
    text-indent: 5px;
}

.play-title {
    max-width: 80%;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    color: var(--white);
    font-weight: 700;
}

.player-message:empty {
    display: none;
}

.detail-content {
    padding: clamp(24px, 4vw, 40px);
}

.detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.detail-heading h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.detail-meta {
    margin-top: 12px;
    color: var(--gray-600);
    font-weight: 700;
}

.category-chip {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--primary-100);
    color: var(--primary-700);
}

.detail-section {
    margin-top: 28px;
}

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    font-size: 17px;
    line-height: 1.85;
}

.tag-cloud span {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 700;
}

.site-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

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

.footer-brand {
    margin-bottom: 10px;
    font-size: 20px;
}

.site-footer p {
    max-width: 560px;
    margin: 0;
}

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

.footer-links a {
    color: var(--gray-600);
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--primary-600);
}

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

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

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

    .menu-button {
        display: block;
    }

    .page-shell {
        width: min(100% - 24px, 1280px);
        padding-top: 20px;
    }

    .hero-carousel {
        height: 64vh;
        min-height: 460px;
        border-radius: 20px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 42px;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-dots {
        left: 22px;
        right: auto;
        bottom: 18px;
    }

    .section-heading,
    .detail-heading,
    .footer-inner {
        display: block;
    }

    .section-heading .text-link,
    .category-chip {
        display: inline-flex;
        margin-top: 12px;
    }

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

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

    .soft-panel,
    .page-hero {
        padding: 22px;
        border-radius: 20px;
    }

    .featured-card {
        min-height: 460px;
    }

    .featured-content {
        padding: 28px;
    }

    .category-card a {
        grid-template-columns: 1fr;
    }

    .category-thumbs img {
        height: 120px;
    }

    .rank-row {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

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

    .detail-content {
        padding: 22px;
    }

    .play-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .play-title {
        font-size: 20px;
    }

    .footer-links {
        justify-content: flex-start;
        margin-top: 20px;
    }
}

@media (max-width: 430px) {
    .movie-grid-six,
    .movie-grid-five {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body p {
        display: none;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }
}
