:root {
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --yellow-50: #fefce8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-md: 0 10px 24px rgba(31, 41, 55, 0.12);
    --shadow-xl: 0 22px 55px rgba(31, 41, 55, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--orange-50), var(--amber-50), var(--yellow-50));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

img,
video {
    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;
    background: linear-gradient(90deg, rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.96));
    box-shadow: 0 4px 16px rgba(31, 41, 55, 0.1);
    backdrop-filter: blur(14px);
}

.header-inner,
.section-inner,
.footer-inner,
.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--orange-600);
}

.brand-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #fb923c, var(--amber-500));
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.28);
    transition: transform 0.3s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(3deg);
}

.desktop-nav {
    display: flex;
    gap: 4px;
}

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.mobile-link:hover {
    color: var(--orange-600);
    background: var(--orange-100);
}

.nav-link.active,
.mobile-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--gray-700);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--gray-200);
    background: #fff;
}

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

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

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

.hero-slide.active img {
    animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1.05);
    }
    to {
        transform: scale(1.12);
    }
}

.hero-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 680px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #fde68a;
    font-weight: 800;
    font-size: 18px;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(38px, 7vw, 66px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0 0 24px;
    max-width: 620px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.34);
}

.btn-secondary {
    color: var(--orange-600);
    background: #fff;
}

.btn-ghost {
    color: #fff;
    border: 2px solid #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: var(--shadow-xl);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 34px;
    background: #fff;
}

.section {
    padding: 68px 0;
}

.section.tinted {
    background: linear-gradient(90deg, var(--orange-100), var(--amber-100));
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    color: var(--gray-800);
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.2;
    font-weight: 900;
}

.section-subtitle {
    margin: 0;
    color: var(--gray-600);
}

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

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--orange-100), var(--amber-100));
}

.movie-grid.feature-grid .poster-frame,
.wide-card .wide-image {
    aspect-ratio: 16 / 10;
}

.poster-frame img,
.wide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card-link:hover img,
.wide-card:hover img {
    transform: scale(1.1);
}

.poster-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card-link:hover .poster-overlay {
    opacity: 1;
}

.play-mark {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    font-size: 24px;
}

.poster-badge,
.poster-meta,
.wide-image span {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    background: var(--orange-500);
    font-size: 12px;
    font-weight: 800;
}

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

.poster-meta {
    left: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

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

.movie-card-body h3,
.wide-content h3 {
    display: -webkit-box;
    min-height: 1.45em;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--gray-800);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.25s ease;
}

.movie-card-link:hover h3,
.wide-card:hover h3,
.rank-item a:hover strong {
    color: var(--orange-600);
}

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

.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--orange-600);
    background: var(--orange-100);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    display: block;
    padding: 26px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.category-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-800);
    font-size: 19px;
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 42px;
    transition: transform 0.3s ease;
}

.category-card:hover span {
    transform: scale(1.13);
}

.category-card p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

.cta-band {
    padding: 72px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    text-align: center;
}

.cta-band h2 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 900;
}

.cta-band p {
    max-width: 700px;
    margin: 0 auto 26px;
    color: #ffedd5;
    font-size: 19px;
}

.page-hero {
    padding: 68px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--orange-500), #d97706);
    text-align: center;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 6vw, 54px);
    line-height: 1.15;
    font-weight: 900;
}

.page-hero p {
    width: min(820px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffedd5;
    font-size: 19px;
}

.filter-panel {
    margin-bottom: 30px;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--gray-700);
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 48px 74px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-number {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    font-weight: 900;
}

.rank-item img {
    width: 74px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    margin-bottom: 5px;
    color: var(--gray-800);
    font-size: 17px;
    transition: color 0.25s ease;
}

.rank-text em {
    color: var(--gray-500);
    font-style: normal;
    font-size: 13px;
}

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

.wide-card a {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.wide-image {
    position: relative;
    overflow: hidden;
}

.wide-image span {
    top: 12px;
    right: 12px;
}

.wide-content {
    padding: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0;
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--orange-600);
}

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

.player-card,
.info-card,
.sidebar-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-xl);
}

.player-stage {
    position: relative;
    overflow: hidden;
    background: #050505;
    aspect-ratio: 16 / 9;
}

.player-stage video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover span {
    position: relative;
    z-index: 2;
    display: inline-flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
    font-size: 34px;
}

.info-card {
    margin-top: 22px;
    padding: 28px;
}

.info-card h1 {
    margin: 0 0 16px;
    color: var(--gray-800);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
    font-weight: 900;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--gray-600);
    font-size: 14px;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--gray-100);
}

.detail-tags span {
    color: var(--orange-600);
    background: var(--orange-100);
    backdrop-filter: none;
}

.detail-section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.detail-section h2 {
    margin: 0 0 10px;
    color: var(--gray-800);
    font-size: 20px;
    font-weight: 900;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
}

.sidebar-card {
    position: sticky;
    top: 90px;
    padding: 22px;
}

.sidebar-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 900;
}

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

.side-item a {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: start;
}

.side-item img {
    width: 86px;
    height: 116px;
    border-radius: 12px;
    object-fit: cover;
}

.side-item strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-800);
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-item span {
    display: block;
    margin: 4px 0;
    color: var(--gray-500);
    font-size: 12px;
}

.side-item p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.no-results {
    display: none;
    padding: 28px;
    border-radius: 18px;
    background: #fff;
    color: var(--gray-600);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.no-results.show {
    display: block;
}

.site-footer {
    margin-top: 50px;
    color: #fff;
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800), var(--gray-900));
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 48px 0 34px;
}

.footer-brand p,
.footer-col a,
.copyright {
    color: #9ca3af;
}

.footer-logo {
    color: #fff;
}

.footer-brand p {
    max-width: 390px;
}

.footer-col {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-col h2 {
    margin: 0 0 8px;
    color: #fb923c;
    font-size: 18px;
}

.footer-col a:hover {
    color: #fb923c;
}

.copyright {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 40;
    display: none;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.back-to-top.show {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .movie-grid,
    .category-grid,
    .wide-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .sidebar-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-mask {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.82));
    }

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

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .wide-grid,
    .rank-list,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .rank-item a {
        grid-template-columns: 38px 62px 1fr;
        gap: 10px;
    }

    .rank-item img {
        width: 62px;
        height: 84px;
    }

    .footer-inner {
        gap: 24px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .section-inner,
    .footer-inner,
    .detail-wrap {
        width: min(100% - 24px, 1180px);
    }

    .hero-carousel {
        height: 530px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 40px;
    }

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

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

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .wide-grid,
    .rank-list,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 46px 0;
    }

    .page-hero {
        padding: 52px 0;
    }

    .info-card {
        padding: 22px;
    }
}
