:root {
    --amber-950: #451a03;
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --amber-50: #fffbeb;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 28px 70px rgba(15, 23, 42, 0.24);
    --radius-xl: 24px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--amber-50), #ffffff 38%, var(--slate-100));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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;
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber-900), var(--amber-700), var(--amber-950));
    box-shadow: 0 12px 30px rgba(69, 26, 3, 0.28);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--amber-950);
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.18);
}

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

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

.nav-link,
.mobile-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--amber-950);
    background: rgba(255, 255, 255, 0.92);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 16px;
    background: rgba(69, 26, 3, 0.94);
}

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

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.45), transparent 34%), linear-gradient(135deg, var(--amber-950), var(--amber-700) 48%, #7f1d1d);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(90deg, rgba(69, 26, 3, 0.92), rgba(69, 26, 3, 0.62) 48%, rgba(15, 23, 42, 0.4));
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.14) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0.14) 75%, transparent 75%, transparent);
    background-size: 72px 72px;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 90px 0 120px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    margin-bottom: 18px;
    color: var(--amber-950);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-weight: 800;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 12px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    max-width: 760px;
    margin: 0 0 18px;
    color: var(--amber-100);
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.15;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

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

.btn-primary,
.btn-ghost,
.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.25s ease;
}

.btn-primary {
    color: var(--amber-950);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

.btn-ghost {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(120, 53, 15, 0.42);
}

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

.btn-dark {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-800), var(--amber-950));
}

.btn-dark:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.page-hero {
    padding: 78px 20px;
    color: #ffffff;
    background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.42), transparent 30%), linear-gradient(135deg, var(--amber-950), var(--amber-700), #7f1d1d);
}

.page-hero-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

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

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.section {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 66px 0;
}

.section.alt {
    width: 100%;
    max-width: none;
    padding: 66px 20px;
    background: linear-gradient(90deg, var(--slate-100), var(--amber-50));
}

.section.alt > .section-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

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

.section-title h2 {
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-title p {
    max-width: 560px;
    margin: 8px 0 0;
    color: var(--slate-600);
}

.section-link {
    flex: 0 0 auto;
    color: var(--amber-800);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    transition: 0.28s ease;
}

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

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

.movie-cover {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-900), var(--slate-900));
}

.movie-card.compact .movie-cover {
    height: 230px;
}

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

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

.movie-year,
.movie-region {
    position: absolute;
    top: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #ffffff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.movie-year {
    left: 14px;
    background: rgba(217, 119, 6, 0.92);
}

.movie-region {
    right: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.movie-info {
    padding: 18px;
}

.movie-meta-line {
    margin-bottom: 6px;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.movie-info h3 {
    display: -webkit-box;
    min-height: 54px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--slate-900);
    font-size: 19px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card.compact .movie-info h3 {
    min-height: auto;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-info p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    color: var(--slate-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 28px;
    margin-top: 14px;
}

.movie-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 4px 9px;
    color: var(--amber-900);
    background: var(--amber-100);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    padding: 22px;
    color: #ffffff;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--amber-800), var(--amber-950));
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -45px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

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

.rank-item {
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: 0.25s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-soft);
}

.rank-item a {
    display: grid;
    grid-template-columns: 64px 88px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-600), var(--amber-950));
    border-radius: 14px;
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 88px;
    height: 116px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--slate-900);
}

.rank-item h3 {
    margin: 0 0 6px;
    color: var(--slate-900);
    font-size: 20px;
}

.rank-item p {
    margin: 0 0 8px;
    color: var(--slate-600);
}

.rank-item span:last-child {
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel {
    margin-bottom: 30px;
    padding: 22px;
    border: 1px solid rgba(146, 64, 14, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--slate-600);
    font-size: 14px;
    font-weight: 800;
}

.search-field {
    margin-bottom: 16px;
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--slate-800);
    border: 1px solid rgba(100, 116, 139, 0.22);
    border-radius: 14px;
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber-600);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.empty-state {
    display: none;
    padding: 44px 20px;
    color: var(--slate-600);
    text-align: center;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.empty-state.show {
    display: block;
}

.detail-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

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

.breadcrumb a {
    color: var(--amber-800);
    font-weight: 800;
}

.detail-card {
    display: grid;
    grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
    gap: 32px;
    padding: 30px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-strong);
}

.detail-poster {
    position: sticky;
    top: 94px;
    align-self: start;
}

.detail-poster img {
    width: 100%;
    border-radius: 20px;
    background: var(--slate-900);
    box-shadow: var(--shadow-soft);
}

.detail-info h1 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.12;
}

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

.detail-meta span {
    padding: 7px 12px;
    color: var(--slate-800);
    background: var(--slate-100);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
}

.detail-info .lead {
    margin: 0 0 22px;
    color: var(--slate-700);
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0 0;
}

.content-block {
    margin-top: 34px;
    padding: 30px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.content-block h2 {
    margin: 0 0 16px;
    color: var(--slate-900);
    font-size: 28px;
}

.content-block p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
}

.content-block p + p {
    margin-top: 16px;
}

.player-box {
    position: relative;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.42), rgba(69, 26, 3, 0.5));
    transition: opacity 0.25s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    padding-left: 5px;
    color: var(--amber-950);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-size: 32px;
    box-shadow: var(--shadow-strong);
}

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

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

.site-footer {
    color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0 36px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-logo span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--amber-950);
    background: var(--amber-500);
    border-radius: 999px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    transition: 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom button {
    padding: 9px 14px;
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    background: var(--amber-800);
}

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero-slider {
        min-height: 580px;
    }

    .hero-content {
        padding-top: 70px;
    }

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

    .movie-cover {
        height: 250px;
    }

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

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

    .detail-card {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .detail-poster {
        position: static;
    }

    .rank-item a {
        grid-template-columns: 48px 74px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-item img {
        width: 74px;
        height: 98px;
    }
}

@media (max-width: 560px) {
    .nav-wrap,
    .section,
    .detail-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 28px, 1180px);
    }

    .hero-content {
        width: min(100% - 28px, 1180px);
    }

    .hero-actions,
    .section-title,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.large,
    .related-grid,
    .category-grid,
    .filter-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-cover,
    .movie-card.compact .movie-cover {
        height: 300px;
    }

    .page-hero {
        padding: 58px 14px;
    }

    .content-block {
        padding: 22px;
    }
}
