:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-50: #fff7ed;
    --orange-600: #ea580c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 10px 25px rgba(17, 24, 39, 0.12);
    --shadow-lg: 0 20px 45px rgba(17, 24, 39, 0.18);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(180, 83, 9, 0.28);
}

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

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

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.logo-mark.small {
    width: 30px;
    height: 30px;
    color: var(--amber-500);
    background: rgba(245, 158, 11, 0.12);
}

.logo-svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 600;
}

.nav-link,
.mobile-nav-link {
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--amber-100);
    opacity: 1;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    padding: 10px;
}

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

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    background: var(--amber-700);
    padding: 12px 16px 18px;
}

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

.mobile-nav-link {
    padding: 10px 0;
    font-weight: 600;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-position: center;
    background-size: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

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

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.52) 45%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 96px;
}

.hero-copy {
    max-width: 720px;
    color: var(--white);
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--amber-600);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

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

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

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

.primary-button {
    background: var(--amber-600);
    color: var(--white);
    box-shadow: 0 15px 35px rgba(217, 119, 6, 0.32);
}

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

.ghost-button {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: var(--white);
    font-size: 42px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

.hero-arrow.previous {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 16px));
    bottom: 86px;
    z-index: 6;
    display: flex;
    width: min(420px, calc(100% - 48px));
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0 18px;
    outline: 0;
    color: var(--gray-900);
}

.hero-search button {
    border: 0;
    padding: 0 22px;
    background: var(--amber-600);
    color: var(--white);
    font-weight: 800;
}

.content-section {
    padding: 64px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-heading span {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber-600), transparent);
}

.section-heading.orange span {
    background: linear-gradient(90deg, var(--orange-600), transparent);
}

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

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

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

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

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

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--gray-200);
}

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

.movie-card:hover img,
.category-tile:hover img,
.popular-row:hover img,
.related-item:hover img,
.ranking-row:hover img {
    transform: scale(1.08);
}

.card-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.36);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .card-shade {
    opacity: 1;
}

.hover-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: var(--amber-600);
    color: var(--white);
    font-size: 22px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.card-badge {
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    background: var(--amber-600);
}

.duration-badge {
    right: 12px;
    bottom: 12px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.72);
}

.card-body {
    display: block;
    padding: 16px;
}

.card-body strong {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
    color: var(--amber-600);
}

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

.compact-card .card-body strong {
    min-height: 44px;
    font-size: 15px;
}

.white-band {
    background: var(--white);
}

.warm-band {
    background: linear-gradient(135deg, var(--amber-50), var(--orange-50));
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 42px;
}

.popular-list,
.ranking-list,
.related-list {
    display: grid;
    gap: 16px;
}

.popular-row,
.ranking-row {
    display: grid;
    grid-template-columns: 56px 150px 1fr;
    gap: 16px;
    align-items: center;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.popular-row:hover,
.ranking-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.popular-row img,
.ranking-row img {
    width: 150px;
    height: 96px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.rank-number,
.ranking-index {
    color: var(--amber-600);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.popular-info,
.ranking-main {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding-right: 16px;
}

.popular-info strong,
.ranking-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
}

.popular-info small,
.popular-info em,
.ranking-main em,
.ranking-meta {
    overflow: hidden;
    color: var(--gray-600);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-grid,
.category-mini-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--gray-900);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.28));
}

.tile-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 22px;
    color: var(--white);
}

.tile-content em {
    margin-bottom: 8px;
    color: var(--amber-100);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tile-content strong {
    margin-bottom: 8px;
    font-size: 24px;
    line-height: 1.15;
}

.tile-content small {
    display: -webkit-box;
    overflow: hidden;
    color: #e5e7eb;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
    color: var(--white);
    padding: 56px 0;
}

.page-hero span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--amber-100);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #fff7ed;
    font-size: 18px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
}

.crumbs a:hover {
    color: var(--white);
}

.crumbs.light {
    margin: 0 0 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--gray-900);
    padding: 0 12px;
    outline: 0;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-empty {
    display: none;
    margin: 36px 0 0;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-600);
    text-align: center;
    box-shadow: var(--shadow);
}

.filter-empty.is-visible {
    display: block;
}

.ranking-row {
    grid-template-columns: 72px 170px minmax(0, 1fr) 220px;
    padding-right: 22px;
}

.ranking-meta {
    justify-self: end;
}

.detail-hero {
    position: relative;
    min-height: 360px;
    background-position: center;
    background-size: cover;
    color: var(--white);
}

.detail-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.42));
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 74px 0 64px;
}

.detail-hero h1 {
    max-width: 960px;
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.detail-hero p {
    max-width: 820px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    margin-top: -64px;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--black);
    box-shadow: var(--shadow-lg);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: rgba(0, 0, 0, 0.42);
    color: var(--white);
    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;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: var(--amber-600);
    color: var(--white);
    font-size: 30px;
    box-shadow: 0 18px 40px rgba(217, 119, 6, 0.36);
}

.detail-card,
.side-card {
    margin-top: 22px;
    padding: 26px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

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

.meta-line,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--gray-600);
    font-size: 14px;
}

.meta-badge,
.tag-list span {
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 800;
}

.meta-badge.amber {
    background: var(--amber-600);
    color: var(--white);
}

.meta-badge.dark {
    background: var(--gray-700);
    color: var(--white);
}

.tag-list {
    margin: 20px 0 0;
}

.tag-list span {
    background: var(--gray-100);
    color: var(--gray-700);
}

.detail-side {
    align-self: start;
    position: sticky;
    top: 88px;
}

.related-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: var(--gray-50);
}

.related-item img {
    width: 120px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.related-item small {
    display: block;
    margin-top: 5px;
    color: var(--gray-500);
    font-size: 12px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 34px;
    padding: 48px 0;
}

.footer-logo {
    color: var(--white);
    font-size: 20px;
}

.footer-brand p,
.site-footer p {
    color: #9ca3af;
    font-size: 14px;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 17px;
}

.footer-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #d1d5db;
    font-size: 14px;
}

.footer-list a:hover {
    color: var(--amber-500);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 16px;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

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

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }

    .hero-search {
        left: 24px;
        right: auto;
        bottom: 76px;
    }

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

    .ranking-meta {
        display: none;
    }
}

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

    .nav-toggle {
        display: block;
    }

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

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

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

    .filter-search {
        grid-column: 1 / -1;
    }
}

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

    .site-logo {
        font-size: 18px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 148px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-search {
        left: 12px;
        right: 12px;
        bottom: 66px;
        width: auto;
    }

    .hero-copy p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .content-section {
        padding: 42px 0;
    }

    .movie-grid,
    .small-grid,
    .catalog-grid,
    .category-grid,
    .category-grid.large,
    .category-mini-grid {
        grid-template-columns: 1fr;
    }

    .popular-row,
    .ranking-row {
        grid-template-columns: 48px 110px minmax(0, 1fr);
        gap: 10px;
    }

    .popular-row img,
    .ranking-row img {
        width: 110px;
        height: 74px;
    }

    .popular-info em {
        display: none;
    }

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

    .detail-hero-content {
        padding: 54px 0 84px;
    }

    .detail-card,
    .side-card {
        padding: 20px;
    }

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