:root {
    --color-bg: #f8fafc;
    --color-panel: #ffffff;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-line: #e5e7eb;
    --color-amber: #f59e0b;
    --color-amber-dark: #d97706;
    --color-orange: #f97316;
    --color-red: #ef4444;
    --color-slate: #0f172a;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
    --shadow-xl: 0 28px 80px rgba(15, 23, 42, 0.22);
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Inter, 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 {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0));
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled,
.inner-page .site-header {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    width: min(1180px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand__mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
    font-size: 14px;
}

.brand__text {
    font-size: 22px;
}

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

.desktop-nav a {
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: currentColor;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--color-amber-dark);
    background: rgba(245, 158, 11, 0.1);
}

.menu-toggle {
    display: none;
    border: 0;
    color: currentColor;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 9px 13px;
    cursor: pointer;
}

.inner-page .menu-toggle,
.site-header.is-scrolled .menu-toggle {
    background: #f3f4f6;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: #fff7ed;
    color: var(--color-amber-dark);
}

.hero {
    position: relative;
    min-height: 690px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange) 55%, var(--color-red));
}

.hero__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: linear-gradient(rgba(255,255,255,0.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.22) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero__inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 690px;
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding-top: 76px;
}

.hero-slide {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    align-items: center;
    gap: 48px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-eyebrow,
.page-eyebrow {
    margin: 0 0 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-slide h1 {
    margin: 0 0 18px;
    font-size: clamp(44px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.hero-summary {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: clamp(18px, 2.2vw, 25px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

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

.hero-tags span,
.detail-tags span,
.movie-card__tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: var(--radius-full);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button--light {
    color: var(--color-amber-dark);
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.button--ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.button--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.button--soft {
    color: var(--color-text);
    background: #f3f4f6;
}

.hero-slide__art {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08));
    box-shadow: var(--shadow-xl);
}

.hero-slide__art::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.36), transparent 36%), linear-gradient(135deg, #fbbf24, #f97316);
}

.hero-slide__art img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 78px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    border-radius: var(--radius-full);
    background: #ffffff;
}

.hero__fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 150px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0), var(--color-bg));
}

.stats-section {
    margin-top: -58px;
    position: relative;
    z-index: 5;
}

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

.stat-card {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--color-panel);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    color: var(--color-text);
}

.stat-card span {
    color: var(--color-muted);
    font-weight: 700;
}

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

.content-section.section--dark {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.section-heading--compact {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading a {
    color: var(--color-amber-dark);
    font-weight: 800;
}

.section--dark .section-heading a {
    color: #fbbf24;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--color-panel);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.section--dark .movie-card {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

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

.movie-card--wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 42% 1fr;
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fbbf24, #f97316);
}

.movie-card:not(.movie-card--wide) .movie-card__poster {
    aspect-ratio: 16 / 11;
}

.movie-card__poster::before,
.side-link__poster::before,
.rank-item__poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 20%, rgba(255,255,255,0.28), transparent 34%), linear-gradient(135deg, #fbbf24, #fb923c);
}

.movie-card__poster img,
.side-link__poster img,
.rank-item__poster img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.movie-card__play {
    position: absolute;
    z-index: 2;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-amber-dark);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.movie-card__body {
    padding: 20px;
}

.movie-card__title {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-card__title:hover {
    color: var(--color-amber-dark);
}

.movie-card__meta,
.movie-card__desc {
    margin: 0;
    color: var(--color-muted);
}

.movie-card__desc {
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card__tags {
    margin-top: 16px;
}

.movie-card__tags span,
.detail-tags span {
    color: #92400e;
    background: #fef3c7;
}

.section--dark .movie-card__meta,
.section--dark .movie-card__desc {
    color: rgba(255, 255, 255, 0.72);
}

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

.category-tile {
    min-height: 104px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: #ffffff;
    text-align: center;
    font-size: 18px;
    font-weight: 850;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-stack {
    display: grid;
    gap: 54px;
}

.page-main {
    min-height: 70vh;
    padding-top: 76px;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
}

.page-hero {
    padding: 76px 0 70px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.page-hero p:not(.page-eyebrow) {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 42px;
}

.pagination a,
.pagination span {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
    font-weight: 800;
}

.pagination a.is-current {
    color: #ffffff;
    background: var(--color-amber);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 170px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.rank-item__number {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
}

.rank-item__poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #fbbf24;
}

.rank-item__title {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 21px;
    font-weight: 850;
}

.rank-item__title:hover {
    color: var(--color-amber-dark);
}

.rank-item__body p {
    margin: 0 0 10px;
    color: var(--color-muted);
}

.rank-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #92400e;
    font-weight: 750;
}

.search-box {
    display: flex;
    max-width: 760px;
    gap: 12px;
    margin-top: 28px;
}

.search-box input {
    flex: 1;
    min-height: 52px;
    border: 0;
    outline: 0;
    border-radius: var(--radius-full);
    padding: 0 20px;
    box-shadow: var(--shadow-sm);
}

.search-box button {
    min-height: 52px;
    border: 0;
    border-radius: var(--radius-full);
    padding: 0 24px;
    color: var(--color-amber-dark);
    background: #ffffff;
    font-weight: 850;
    cursor: pointer;
}

.search-results {
    display: grid;
    gap: 18px;
}

.search-empty {
    padding: 38px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    color: var(--color-muted);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.detail-hero {
    padding: 34px 0 76px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 750;
}

.breadcrumbs a:hover {
    color: #ffffff;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow-xl);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-amber-dark);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
    font-size: 28px;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.detail-card,
.side-panel {
    color: var(--color-text);
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--color-muted);
    font-weight: 750;
}

.detail-card section {
    margin-top: 28px;
}

.detail-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: #374151;
    white-space: pre-line;
}

.detail-tags {
    margin-top: 28px;
}

.detail-side {
    display: grid;
    gap: 20px;
}

.side-panel {
    padding: 22px;
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-line);
}

.info-list dt,
.info-list dd {
    margin: 0;
}

.info-list dt {
    color: var(--color-muted);
}

.info-list dd {
    text-align: right;
    font-weight: 800;
}

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

.side-link {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    margin: -8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.side-link:hover {
    background: #f9fafb;
}

.side-link__poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #fbbf24;
}

.side-link__text strong,
.side-link__text em {
    display: block;
}

.side-link__text strong {
    line-height: 1.35;
    font-size: 15px;
}

.side-link__text em {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.site-footer__inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.site-footer__brand {
    max-width: 540px;
}

.site-footer__brand p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-content: start;
    justify-content: flex-end;
}

.site-footer__links a {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 750;
}

.site-footer__links a:hover {
    color: #ffffff;
}

img.is-missing {
    opacity: 0;
}

@media (max-width: 1040px) {
    .movie-grid,
    .movie-grid--dense {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .site-header__inner {
        height: 66px;
    }

    .hero,
    .hero__inner {
        min-height: 760px;
    }

    .hero__inner {
        padding-top: 92px;
        align-items: start;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-slide__art {
        width: min(280px, 78vw);
        justify-self: start;
        border-radius: 26px;
    }

    .hero-dots {
        bottom: 36px;
    }

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

    .movie-grid,
    .movie-grid--dense,
    .category-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .movie-card--wide {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 118px 1fr;
        gap: 12px;
    }

    .search-box {
        flex-direction: column;
    }

    .site-footer__inner {
        flex-direction: column;
    }

    .site-footer__links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .container,
    .site-header__inner,
    .site-footer__inner,
    .hero__inner,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .brand__text {
        font-size: 19px;
    }

    .hero-slide h1 {
        font-size: 42px;
    }

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

    .stat-card,
    .detail-card,
    .side-panel {
        padding: 18px;
    }

    .rank-item {
        grid-template-columns: 38px 1fr;
    }

    .rank-item__poster {
        display: none;
    }

    .side-link {
        grid-template-columns: 94px 1fr;
    }
}
