:root {
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --white: #ffffff;
    --black: #000000;
    --shadow-soft: 0 18px 40px rgba(28, 25, 23, 0.12);
    --shadow-strong: 0 24px 70px rgba(28, 25, 23, 0.32);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(41, 37, 36, 0.96);
    color: var(--stone-50);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

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

.site-logo {
    flex: 0 0 auto;
    font-size: 20px;
}

.site-logo__mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-700));
    color: var(--white);
    font-size: 14px;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.36);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    font-size: 15px;
}

.site-nav a,
.mobile-panel a,
.site-footer a {
    transition: color 0.2s ease;
}

.site-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
    color: var(--amber-400);
}

.header-search,
.mobile-search,
.hero-search-form {
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
}

.header-search {
    width: 260px;
    background: rgba(68, 64, 60, 0.86);
}

.header-search input,
.mobile-search input,
.hero-search-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
}

.header-search input,
.mobile-search input {
    padding: 10px 14px;
    background: transparent;
    color: var(--stone-50);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: var(--stone-400);
}

.header-search button,
.mobile-search button,
.hero-search-form button,
.button {
    border: 0;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
    padding: 10px 16px;
    background: var(--amber-600);
    color: var(--white);
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search-form button:hover,
.button:hover {
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--stone-50);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(214, 211, 209, 0.14);
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding: 16px 0;
}

.mobile-search {
    background: rgba(68, 64, 60, 0.86);
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--stone-800), var(--stone-700) 52%, #78350f);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.66fr);
    align-items: center;
    gap: 42px;
    width: 100%;
    padding: 72px max(24px, calc((100% - 1180px) / 2)) 76px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.66), rgba(28, 25, 23, 0.32)), var(--hero-image);
    background-position: center;
    background-size: cover;
    opacity: 0.42;
}

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

.hero-slide__content,
.hero-poster {
    position: relative;
    z-index: 1;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--amber-400);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-slide h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-slide p,
.page-hero p,
.detail-info p {
    margin: 0;
    max-width: 740px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2vw, 23px);
}

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

.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(251, 191, 36, 0.38);
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(28, 25, 23, 0.32);
    color: var(--amber-400);
    font-size: 13px;
    font-weight: 700;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 11px 22px;
}

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

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

.button-ghost {
    border: 1px solid rgba(255, 255, 255, 0.36);
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.button-light {
    background: var(--white);
    color: var(--stone-900);
}

.hero-poster {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transform: rotate(1.5deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

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

.hero-controls button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
}

.hero-controls button.is-active {
    width: 34px;
    background: var(--amber-400);
}

.hero-search-section {
    margin-top: -42px;
    position: relative;
    z-index: 4;
}

.hero-search-card {
    display: grid;
    grid-template-columns: 0.55fr 1fr;
    align-items: center;
    gap: 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.hero-search-card h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 34px);
}

.hero-search-form {
    background: var(--stone-100);
    border: 1px solid var(--stone-200);
}

.hero-search-form input {
    padding: 16px 18px;
    background: transparent;
    color: var(--stone-900);
}

.hero-search-form button {
    align-self: stretch;
    padding: 0 24px;
    background: var(--stone-900);
    color: var(--white);
}

.section-block {
    padding: 72px 0;
}

.section-muted {
    background: var(--stone-100);
}

.section-dark {
    background: var(--stone-900);
    color: var(--white);
}

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

.section-heading h2 {
    margin: 0;
    color: inherit;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--stone-500);
}

.section-dark .section-heading p {
    color: var(--stone-400);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--amber-700);
    font-weight: 800;
    white-space: nowrap;
}

.section-dark .section-link {
    color: var(--amber-400);
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card__poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--stone-300);
}

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

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

.movie-card__year,
.movie-card__play {
    position: absolute;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    font-weight: 800;
}

.movie-card__year {
    top: 10px;
    right: 10px;
    min-width: 52px;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(28, 25, 23, 0.74);
    font-size: 12px;
}

.movie-card__play {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(217, 119, 6, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card__body {
    padding: 16px;
}

.movie-card__body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card__body h3 a:hover,
.ranking-item h3 a:hover {
    color: var(--amber-700);
}

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

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--stone-500);
    font-size: 12px;
}

.movie-card__meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--stone-100);
}

.section-dark .movie-card {
    background: var(--stone-800);
}

.section-dark .movie-card__body p,
.section-dark .movie-card__meta {
    color: var(--stone-300);
}

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

.category-card {
    min-height: 190px;
    border-radius: var(--radius-md);
    padding: 20px;
    background: linear-gradient(145deg, var(--stone-900), var(--stone-700));
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-card > a {
    display: grid;
    gap: 10px;
}

.category-card span {
    color: var(--amber-400);
    font-size: 14px;
    font-weight: 800;
}

.category-card strong {
    font-size: 18px;
    line-height: 1.45;
}

.category-card__links {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    color: var(--stone-300);
    font-size: 13px;
}

.page-hero {
    padding: 88px 0;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.32), transparent 36%), linear-gradient(135deg, var(--stone-900), var(--stone-700));
    color: var(--white);
}

.page-hero p {
    max-width: 780px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.08);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    padding: 12px 14px;
    background: var(--stone-50);
    outline: 0;
}

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

.overview-stack {
    display: grid;
    gap: 42px;
}

.category-overview {
    padding-bottom: 42px;
    border-bottom: 1px solid var(--stone-200);
}

.ranking-page-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

.ranking-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 12px;
    border-radius: var(--radius-md);
    padding: 20px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.08);
}

.ranking-side h2 {
    margin: 0 0 8px;
}

.ranking-side a {
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--stone-100);
    font-weight: 700;
}

.ranking-side a:hover {
    background: var(--amber-600);
    color: var(--white);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 18px;
    border-radius: var(--radius-md);
    padding: 14px;
    background: var(--white);
    box-shadow: 0 10px 26px rgba(28, 25, 23, 0.08);
}

.ranking-item__poster {
    overflow: hidden;
    border-radius: 12px;
    background: var(--stone-300);
}

.ranking-item__poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.ranking-item__body {
    align-self: center;
}

.ranking-item__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ranking-item h3 {
    margin: 0;
    font-size: 18px;
}

.ranking-item p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--stone-600);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--amber-600);
    color: var(--white);
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--stone-900);
}

.detail-hero__bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.97), rgba(28, 25, 23, 0.78), rgba(28, 25, 23, 0.52)), var(--detail-image);
    background-position: center;
    background-size: cover;
    opacity: 0.74;
    filter: blur(1px);
}

.detail-hero__content {
    position: relative;
    padding: 38px 0 62px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--stone-300);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--amber-400);
}

.detail-hero__grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

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

.detail-info p {
    color: rgba(255, 255, 255, 0.82);
}

.player-section {
    padding: 36px 0 0;
    background: var(--stone-900);
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.player-cover button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    padding: 16px 24px;
    background: var(--amber-600);
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

.player-cover button:hover {
    background: var(--amber-700);
}

.player-cover__icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

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

.detail-article,
.detail-side {
    border-radius: var(--radius-lg);
    padding: 26px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.08);
}

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

.detail-article p {
    margin: 0 0 24px;
    color: var(--stone-700);
    font-size: 17px;
}

.movie-facts {
    display: grid;
    gap: 12px;
    margin: 0;
}

.movie-facts div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--stone-100);
    padding-bottom: 12px;
}

.movie-facts dt {
    color: var(--stone-500);
    font-weight: 800;
}

.movie-facts dd {
    margin: 0;
}

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

.side-list .ranking-item {
    grid-template-columns: 110px 1fr;
    padding: 0;
    box-shadow: none;
}

.side-list .ranking-item__head {
    margin-bottom: 4px;
}

.side-list .ranking-item p {
    font-size: 13px;
    -webkit-line-clamp: 1;
}

.site-footer {
    background: var(--stone-900);
    color: var(--stone-300);
}

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

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

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

.site-footer p {
    margin: 0;
    color: var(--stone-400);
}

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

.footer-bottom {
    border-top: 1px solid rgba(214, 211, 209, 0.12);
    padding: 18px 0;
    text-align: center;
    color: var(--stone-500);
    font-size: 14px;
}

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

    .header-search {
        margin-left: auto;
    }

    .mobile-toggle {
        display: block;
    }

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 650px;
        padding-top: 52px;
    }

    .hero-poster {
        max-width: 420px;
        transform: none;
    }

    .hero-search-card,
    .ranking-page-layout,
    .detail-hero__grid,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-side {
        position: static;
    }

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

    .ranking-list--home,
    .movie-grid--three,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 340px;
    }
}

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

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

    .hero-carousel {
        min-height: 660px;
    }

    .hero-slide {
        padding-inline: 18px;
    }

    .hero-actions,
    .page-hero__actions,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid--five,
    .movie-grid--four,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 112px 1fr;
        gap: 12px;
    }

    .ranking-item h3 {
        font-size: 16px;
    }

    .ranking-item p {
        font-size: 13px;
    }

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

    .movie-facts div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
