:root {
    --orange: #f97316;
    --amber: #f59e0b;
    --yellow: #eab308;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #ea580c, #d97706, #ca8a04);
    box-shadow: 0 8px 28px rgba(120, 53, 15, 0.28);
}

.site-header__inner {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.site-logo__icon {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 20px rgba(124, 45, 18, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: #fef3c7;
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
    border: 0;
    outline: none;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 11px 16px;
    min-width: 240px;
    backdrop-filter: blur(12px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.mobile-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--white);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-nav a {
    display: block;
    padding: 11px 14px;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.mobile-nav.is-open {
    display: block;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 590px;
    color: var(--white);
    background: var(--slate-950);
}

.hero__inner {
    position: relative;
    width: 100%;
    min-height: 590px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(124, 45, 18, 0.92), rgba(180, 83, 9, 0.82), rgba(202, 138, 4, 0.68)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(12px);
    transform: scale(1.08);
}

.hero-slide::after {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(254, 243, 199, 0.28), transparent 34%), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.35));
}

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

.hero-slide__content,
.hero-slide__poster {
    position: relative;
    z-index: 2;
}

.hero-slide__content {
    max-width: 720px;
    padding: 40px 0;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fef3c7;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 16px 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    font-weight: 950;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.hero p {
    max-width: 680px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2.6vw, 22px);
}

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

.hero-tags span,
.detail-tags span,
.movie-card__tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.15);
    font-size: 13px;
    font-weight: 700;
}

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

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

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

.button--primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--amber));
    box-shadow: 0 16px 35px rgba(249, 115, 22, 0.34);
}

.button--ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(10px);
}

.hero-slide__poster {
    display: block;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.40);
    transform: rotate(2deg);
}

.hero-slide__poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

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

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

.section-block {
    margin: 54px auto;
}

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

.section-heading h2,
.search-panel h2,
.category-preview h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(26px, 3.5vw, 36px);
    line-height: 1.15;
    font-weight: 950;
}

.section-heading p,
.search-panel p,
.category-preview p {
    margin: 8px 0 0;
    color: var(--slate-600);
}

.section-heading > a {
    color: #ea580c;
    font-weight: 900;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    align-items: center;
    gap: 28px;
    padding: 28px;
    margin-top: -44px;
    position: relative;
    z-index: 6;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow);
}

.search-panel form {
    display: flex;
    gap: 10px;
}

.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--slate-800);
    background: var(--slate-100);
}

.search-panel input::placeholder,
.filter-bar input::placeholder {
    color: #94a3b8;
}

.search-panel button {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

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

.category-tile,
.category-card {
    display: block;
    min-height: 132px;
    padding: 22px;
    color: var(--white);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ea580c, #d97706 55%, #eab308);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover,
.movie-card:hover,
.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span,
.category-card span {
    display: block;
    margin-bottom: 12px;
    font-size: 21px;
    font-weight: 950;
}

.category-tile strong,
.category-card p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 600;
}

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

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

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

.movie-card__poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.movie-card__poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-card__badge,
.movie-card__play {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
}

.movie-card__badge {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    font-size: 12px;
}

.movie-card__play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(8px);
}

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

.movie-card__body {
    padding: 16px;
}

.movie-card__meta,
.rank-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #ea580c;
    font-size: 13px;
    font-weight: 850;
}

.movie-card h3,
.rank-item h3 {
    margin: 9px 0 8px;
    color: var(--slate-900);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 950;
}

.movie-card p,
.rank-item p {
    display: -webkit-box;
    margin: 0 0 12px;
    color: var(--slate-600);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card--compact {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 138px;
}

.movie-card--compact .movie-card__poster img {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card--compact .movie-card__body {
    padding: 14px;
}

.movie-card--compact h3 {
    font-size: 16px;
}

.movie-card--compact .movie-card__tags,
.movie-card--compact .movie-card__play {
    display: none;
}

.rank-section {
    padding: 34px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #fff7ed, #ffffff);
    box-shadow: var(--soft-shadow);
}

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

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 92px 42px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item__cover {
    border-radius: 14px;
    overflow: hidden;
}

.rank-item__cover img {
    width: 92px;
    height: 120px;
    object-fit: cover;
}

.rank-item__index {
    color: #fed7aa;
    font-size: 34px;
    font-weight: 950;
    line-height: 1;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    color: var(--white);
    background: linear-gradient(120deg, #7c2d12, #ea580c 55%, #eab308);
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -50% 20%;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    filter: blur(40px);
}

.page-hero .container,
.detail-layout {
    position: relative;
    z-index: 2;
}

.page-hero h1,
.detail-info h1 {
    margin: 14px 0;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    font-weight: 950;
}

.page-hero p,
.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 800;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.filter-bar--wide {
    grid-template-columns: minmax(0, 1fr) 200px;
}

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

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

.stacked-previews {
    display: grid;
    gap: 32px;
}

.category-preview {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

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

.detail-hero {
    padding: 58px 0;
    background: radial-gradient(circle at 25% 10%, rgba(254, 215, 170, 0.28), transparent 30%), linear-gradient(120deg, #0f172a, #7c2d12 48%, #d97706);
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-tags {
    margin: 22px 0 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.78));
}

.player-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.92);
    font-size: 36px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
    max-width: min(680px, calc(100% - 48px));
    font-size: clamp(20px, 3.5vw, 34px);
    line-height: 1.2;
    text-align: center;
}

.player-overlay.is-hidden {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 24px;
}

.detail-content article {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-content article:first-child {
    grid-row: span 2;
}

.detail-content h2 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: 24px;
    font-weight: 950;
}

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

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
}

.info-list dt {
    color: var(--slate-500);
    font-weight: 850;
}

.info-list dd {
    margin: 0;
    color: var(--slate-900);
    font-weight: 900;
}

.site-footer {
    margin-top: 80px;
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fdba74;
    font-size: 18px;
}

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

.footer-grid a:not(.footer-logo) {
    display: block;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.78);
}

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

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

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

    .site-header__inner {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

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

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

@media (max-width: 820px) {
    .hero,
    .hero__inner {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 34px 0 80px;
    }

    .hero-slide__poster {
        width: min(260px, 78vw);
        margin: 0 auto;
        transform: none;
    }

    .search-panel,
    .detail-layout,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .search-panel form,
    .filter-bar,
    .filter-bar--wide {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .category-grid,
    .category-card-grid,
    .compact-grid,
    .rank-grid,
    .rank-grid--page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-poster {
        width: min(280px, 80vw);
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .site-logo {
        font-size: 19px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .movie-grid,
    .category-grid,
    .category-card-grid,
    .compact-grid,
    .rank-grid,
    .rank-grid--page {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 78px 34px minmax(0, 1fr);
    }

    .rank-item__cover img {
        width: 78px;
        height: 104px;
    }

    .movie-card--compact {
        grid-template-columns: 90px minmax(0, 1fr);
    }

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