:root {
    --orange-700: #c2410c;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-400: #fb923c;
    --red-600: #dc2626;
    --yellow-500: #eab308;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
    --shadow-md: 0 8px 24px rgb(15 23 42 / 0.08);
    --shadow-lg: 0 18px 40px rgb(15 23 42 / 0.16);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-600), var(--red-600));
    box-shadow: var(--shadow-md);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: var(--orange-600);
    background: var(--white);
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.16);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08);
}

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

.main-nav a,
.mobile-panel a {
    font-weight: 700;
    color: rgb(255 255 255 / 0.92);
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: #fef3c7;
}

.header-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.92);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4);
}

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

.header-search button,
.mobile-search button {
    border: 0;
    padding: 10px 16px;
    color: var(--white);
    font-weight: 700;
    background: var(--yellow-500);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgb(0 0 0 / 0.18);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
}

.mobile-panel {
    border-top: 1px solid rgb(255 255 255 / 0.18);
    background: var(--orange-700);
}

.mobile-panel nav,
.mobile-search {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.mobile-panel nav {
    display: grid;
    gap: 14px;
    padding: 18px 0;
}

.mobile-search {
    display: flex;
    overflow: hidden;
    padding-bottom: 18px;
    border-radius: 999px;
}

.mobile-search input {
    flex: 1;
    background: rgb(255 255 255 / 0.92);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: var(--white);
    background: var(--gray-900);
}

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

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgb(0 0 0 / 0.92), rgb(0 0 0 / 0.48) 45%, rgb(0 0 0 / 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 76px;
    width: min(1280px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-content h1 {
    max-width: 760px;
    margin: 14px 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgb(255 255 255 / 0.9);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    background: rgb(249 115 22 / 0.92);
    box-shadow: 0 8px 18px rgb(0 0 0 / 0.2);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--orange-600);
    box-shadow: 0 14px 30px rgb(234 88 12 / 0.32);
}

.secondary-button {
    color: var(--white);
    background: rgb(255 255 255 / 0.18);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.primary-button:hover {
    background: var(--orange-700);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    font-size: 36px;
    line-height: 1;
    background: rgb(0 0 0 / 0.35);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

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

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section,
.category-overview-block,
.page-hero,
.detail-layout,
.detail-breadcrumbs {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.content-section,
.category-overview-block {
    padding: 42px 0;
}

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

.section-head h2,
.page-hero h1 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-head a {
    color: var(--orange-600);
    font-weight: 800;
}

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

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

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

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

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

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
}

.compact .poster-wrap {
    aspect-ratio: 3 / 4;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0);
    transition: background 0.25s ease;
}

.card-link:hover .poster-wrap::after {
    background: rgb(0 0 0 / 0.28);
}

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    padding: 4px 9px;
    border-radius: 8px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    right: 10px;
    background: var(--orange-500);
}

.rank-badge {
    left: 10px;
    background: var(--yellow-500);
}

.play-hover {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    font-size: 24px;
    background: rgb(249 115 22 / 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--gray-800);
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.compact .card-body h3 {
    min-height: 42px;
    font-size: 16px;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

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

.category-tile {
    min-height: 128px;
    padding: 26px;
    border-radius: var(--radius-md);
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-400), var(--red-600));
    box-shadow: var(--shadow-md);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 1.1;
}

.category-tile span {
    display: block;
    color: rgb(255 255 255 / 0.86);
    font-size: 14px;
}

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

.latest-row {
    display: grid;
    grid-template-columns: 54px 150px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.latest-row:hover {
    background: #fff7ed;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.latest-index {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 999px;
    color: var(--orange-600);
    font-weight: 900;
    background: #ffedd5;
}

.latest-row img {
    width: 150px;
    height: 88px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--gray-200);
}

.latest-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.latest-copy strong {
    overflow: hidden;
    color: var(--gray-900);
    font-size: 18px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.latest-copy em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-600);
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.latest-copy small {
    color: var(--gray-500);
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    margin-top: 34px;
    padding: 42px;
    border-radius: var(--radius-lg);
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-600), var(--red-600));
    box-shadow: var(--shadow-md);
}

.page-hero h1 {
    color: var(--white);
}

.page-hero p,
.category-overview-block p {
    max-width: 850px;
    margin: 14px 0 0;
    color: rgb(255 255 255 / 0.9);
    font-size: 18px;
}

.category-overview-block p {
    color: var(--gray-600);
    font-size: 16px;
    margin-bottom: 22px;
}

.breadcrumbs,
.detail-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    color: rgb(255 255 255 / 0.84);
    font-size: 14px;
}

.detail-breadcrumbs {
    margin-top: 24px;
    color: var(--gray-600);
}

.breadcrumbs a,
.detail-breadcrumbs a {
    color: inherit;
    font-weight: 700;
}

.filter-panel {
    padding-bottom: 12px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.filter-grid label {
    display: grid;
    gap: 8px;
    color: var(--gray-600);
    font-weight: 700;
}

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

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 4px rgb(249 115 22 / 0.12);
}

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

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.player-card {
    margin-bottom: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--gray-950);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--gray-950);
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(0deg, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.12));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 999px;
    background: var(--orange-600);
    box-shadow: 0 18px 36px rgb(234 88 12 / 0.42);
}

.detail-title-block {
    padding: 24px;
}

.detail-title-block h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}

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

.detail-meta span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--orange-700);
    font-size: 14px;
    font-weight: 800;
    background: #ffedd5;
}

.lead-text {
    margin: 0;
    color: var(--gray-700);
    font-size: 18px;
    font-weight: 700;
}

.detail-card {
    padding: 24px;
    margin-bottom: 24px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-card p,
.side-card p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-side {
    min-width: 0;
}

.sticky-card {
    position: sticky;
    top: 88px;
}

.side-card {
    padding: 18px;
}

.side-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--gray-200);
}

.side-card h2 {
    margin-top: 16px;
}

.full-button {
    width: 100%;
    margin-top: 18px;
}

.related-section {
    padding-top: 18px;
}

.site-footer {
    margin-top: 54px;
    color: var(--gray-300);
    background: var(--gray-900);
}

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

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer p,
.site-footer ul {
    margin: 0;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: var(--orange-400);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgb(255 255 255 / 0.08);
    color: var(--gray-500);
    text-align: center;
}

@media (max-width: 1120px) {
    .main-nav {
        gap: 18px;
    }

    .header-search input {
        width: 170px;
    }

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

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

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

    .sticky-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        height: 500px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

@media (max-width: 560px) {
    .header-inner,
    .content-section,
    .category-overview-block,
    .page-hero,
    .detail-layout,
    .detail-breadcrumbs,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        height: 430px;
    }

    .hero-content {
        bottom: 58px;
        width: min(100% - 24px, 1280px);
    }

    .hero-tags span {
        font-size: 12px;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .secondary-button {
        min-height: 42px;
        padding: 0 16px;
    }

    .content-section,
    .category-overview-block {
        padding: 28px 0;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        min-height: 40px;
        font-size: 15px;
    }

    .card-body p {
        min-height: 40px;
        font-size: 13px;
    }

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

    .latest-row {
        grid-template-columns: 42px 92px 1fr;
        gap: 10px;
    }

    .latest-index {
        width: 36px;
        height: 36px;
    }

    .latest-row img {
        width: 92px;
        height: 62px;
    }

    .latest-copy strong {
        font-size: 15px;
    }

    .latest-copy em {
        display: none;
    }

    .page-hero {
        margin-top: 18px;
        padding: 28px 20px;
    }

    .detail-title-block,
    .detail-card {
        padding: 18px;
    }
}
