:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e2e8f0;
    --dark: #020617;
    --dark-2: #0f172a;
    --cyan: #06b6d4;
    --cyan-bright: #22d3ee;
    --blue: #2563eb;
    --amber: #f59e0b;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.25);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    height: 80px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--cyan-bright);
    border: 1px solid rgba(34, 211, 238, 0.38);
    border-radius: 14px;
    background: rgba(8, 145, 178, 0.12);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.18);
    transition: transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.brand__icon svg {
    width: 25px;
    height: 25px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand:hover .brand__icon {
    color: #a5f3fc;
    transform: scale(1.08);
    box-shadow: 0 0 38px rgba(34, 211, 238, 0.28);
}

.brand__text strong,
.footer-brand strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand__text small,
.footer-brand small {
    display: block;
    margin-top: 3px;
    color: var(--cyan-bright);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    position: relative;
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan-bright);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.header-search,
.mobile-search {
    position: relative;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 11px 14px 11px 42px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: #94a3b8;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
    background: rgba(15, 23, 42, 0.9);
}

.header-search__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #94a3b8;
    font-size: 20px;
    transform: translateY(-50%);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    color: #ffffff;
    background: transparent;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: currentColor;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    padding: 12px 24px 22px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-search {
    margin-bottom: 12px;
}

.mobile-search input {
    padding: 11px 14px;
}

.mobile-nav-link {
    display: block;
    padding: 11px 14px;
    color: #cbd5e1;
    border-radius: 12px;
    font-weight: 650;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--cyan-bright);
    background: rgba(51, 65, 85, 0.78);
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(8, 145, 178, 0.36), transparent 32%),
        linear-gradient(135deg, #020617 0%, #172554 55%, #164e63 100%);
    color: #ffffff;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 58px 58px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.23;
    filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72) 46%, rgba(2, 6, 23, 0.36)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 55%);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    max-width: 1280px;
    min-height: 650px;
    margin: 0 auto;
    padding: 76px 24px 104px;
    gap: 50px;
}

.hero-copy {
    max-width: 780px;
    animation: fade-up 0.8s ease both;
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: #c7e4ee;
    font-size: clamp(18px, 2.2vw, 23px);
}

.hero-meta,
.detail-meta,
.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.card-meta-row span {
    padding: 7px 11px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    font-size: 13px;
}

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

.button-primary,
.button-secondary,
.button-soft,
.footer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

.button-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.34);
}

.button-secondary {
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.32);
    background: rgba(15, 23, 42, 0.52);
}

.button-secondary:hover {
    color: #ffffff;
    background: rgba(8, 145, 178, 0.22);
}

.button-soft,
.footer-button {
    color: #075985;
    background: #ecfeff;
}

.button-soft:hover,
.footer-button:hover {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-poster {
    position: relative;
    display: block;
    width: min(390px, 100%);
    justify-self: end;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 35px 90px rgba(2, 6, 23, 0.55);
    transform: rotate(1.5deg);
    transition: transform 0.35s ease;
}

.hero-poster:hover {
    transform: rotate(0) translateY(-8px);
}

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

.hero-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.86));
}

.hero-poster__label {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 1;
    color: #ffffff;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    right: 24px;
    bottom: 28px;
    left: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}

.hero-dot {
    width: 42px;
    height: 5px;
    padding: 0;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 70px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.page-main {
    min-height: 70vh;
}

.section,
.page-section {
    padding: 72px 0;
}

.section--soft {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

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

.section-heading,
.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 26px;
    margin-bottom: 34px;
}

.section-heading h2,
.page-heading h1,
.detail-copy h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.stats-strip {
    position: relative;
    z-index: 3;
    margin-top: -50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.stat-card {
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
}

.stat-card strong {
    display: block;
    color: #0e7490;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 650;
}

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

.category-card {
    min-height: 250px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card__main {
    position: relative;
    display: block;
    min-height: 168px;
    padding: 24px;
    color: #ffffff;
    background: radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.45), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 56%, #0e7490 100%);
}

.category-card:nth-child(2n) .category-card__main {
    background: radial-gradient(circle at 85% 15%, rgba(96, 165, 250, 0.45), transparent 28%),
        linear-gradient(135deg, #111827 0%, #581c87 56%, #0f766e 100%);
}

.category-card:nth-child(3n) .category-card__main {
    background: radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.36), transparent 28%),
        linear-gradient(135deg, #111827 0%, #7f1d1d 56%, #155e75 100%);
}

.category-card__eyebrow {
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 800;
}

.category-card h2 {
    margin: 12px 0 6px;
    font-size: 24px;
    line-height: 1.2;
}

.category-card p {
    margin: 0 0 18px;
    color: #dbeafe;
}

.category-card strong {
    color: #ffffff;
}

.category-card__samples {
    display: grid;
    gap: 8px;
    padding: 16px 18px 20px;
}

.category-card__samples a {
    color: #334155;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.category-card__samples a:hover {
    color: #0891b2;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(6, 182, 212, 0.36);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

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

.movie-card__shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(2, 6, 23, 0.38);
    transition: opacity 0.25s ease;
}

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

.movie-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.36);
    transform: translate(-50%, -50%) scale(0.84);
    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__year,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.rank-badge {
    right: auto;
    left: 12px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.movie-card__body {
    padding: 16px;
}

.movie-card__meta,
.movie-card__genre {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-card h3 {
    margin: 7px 0 6px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 850;
}

.movie-card h3 a:hover {
    color: #0891b2;
}

.movie-card__summary {
    display: -webkit-box;
    min-height: 44px;
    margin: 10px 0 13px;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.movie-card__tags span,
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    color: #0e7490;
    background: #ecfeff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

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

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

.movie-card--compact .movie-card__summary {
    display: none;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 34px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 104px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

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

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

.rank-line {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
    background: #ecfeff;
    transform: translateX(4px);
}

.rank-line__number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 14px;
    font-weight: 900;
}

.rank-line__text {
    min-width: 0;
}

.rank-line__text strong,
.rank-line__text em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-line__text strong {
    color: #0f172a;
}

.rank-line__text em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-line__arrow {
    color: #0891b2;
    font-size: 28px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.28), transparent 28%),
        linear-gradient(135deg, #020617 0%, #172554 54%, #164e63 100%);
}

.page-hero::before,
.detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 60px 60px;
}

.page-hero__inner {
    position: relative;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 72px 0;
}

.page-hero h1 {
    max-width: 860px;
    margin: 18px 0 14px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #bae6fd;
    font-size: 14px;
}

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

.filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
}

.filter-input,
.filter-select {
    min-height: 46px;
    padding: 0 14px;
    color: var(--text);
    background: #f8fafc;
    border-color: #e2e8f0;
}

.filter-input::placeholder {
    color: #94a3b8;
}

.filter-result {
    margin: -12px 0 24px;
    color: var(--muted);
    font-size: 14px;
}

.no-results {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
}

.detail-hero__bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
}

.detail-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.1);
}

.detail-hero__bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.74));
}

.detail-hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(250px, 350px) minmax(0, 1fr);
    gap: 42px;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 58px 0 70px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 35px 80px rgba(2, 6, 23, 0.5);
}

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

.detail-copy h1 {
    color: #ffffff;
}

.detail-copy .lead {
    max-width: 850px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

.detail-meta span {
    background: rgba(15, 23, 42, 0.62);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 24px 0 0;
}

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

.content-panel,
.side-panel,
.player-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.content-panel,
.side-panel {
    padding: 28px;
}

.content-panel h2,
.side-panel h2,
.player-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.25;
}

.content-panel p {
    margin: 0 0 22px;
    color: #334155;
    font-size: 17px;
}

.player-panel {
    overflow: hidden;
    margin-bottom: 34px;
}

.player-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a, #1e3a8a, #0e7490);
}

.player-panel__header h2 {
    margin: 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.82));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 999px;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.38);
    font-size: 20px;
    font-weight: 900;
}

.player-button span:first-child {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #0f172a;
    background: #ffffff;
    border-radius: 50%;
}

.player-message {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: none;
    padding: 12px 14px;
    color: #fee2e2;
    background: rgba(127, 29, 29, 0.82);
    border-radius: 12px;
}

.player-message.is-visible {
    display: block;
}

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

.related-list a {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.related-list img {
    width: 58px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.related-list strong,
.related-list span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.related-list span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.site-footer__inner {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 13px;
}

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

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

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

.site-footer a:hover {
    color: var(--cyan-bright);
}

.footer-button {
    margin-top: 18px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-inner,
    .detail-hero__inner,
    .detail-body,
    .rank-layout {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        min-height: auto;
        padding-top: 66px;
    }

    .hero-poster {
        justify-self: start;
        width: min(300px, 76vw);
    }

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 700px) {
    .site-header__inner {
        height: 70px;
        padding: 0 16px;
    }

    .brand__icon {
        width: 40px;
        height: 40px;
    }

    .brand__text strong {
        font-size: 18px;
    }

    .brand__text small {
        font-size: 11px;
    }

    .container,
    .site-footer__inner,
    .page-hero__inner,
    .detail-hero__inner {
        width: min(100% - 32px, 1280px);
    }

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

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy p,
    .detail-copy .lead {
        font-size: 16px;
    }

    .section,
    .page-section {
        padding: 52px 0;
    }

    .section-heading,
    .page-heading,
    .footer-bottom {
        align-items: start;
        flex-direction: column;
    }

    .stats-strip {
        margin-top: 0;
        padding-top: 22px;
        background: #f8fafc;
    }

    .stats-grid,
    .category-grid,
    .movie-grid,
    .movie-grid--compact,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card strong {
        font-size: 26px;
    }

    .movie-card__body {
        padding: 12px;
    }

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

    .movie-card__summary,
    .movie-card__tags,
    .movie-card__genre {
        display: none;
    }

    .page-hero__inner {
        padding: 48px 0;
    }

    .detail-hero__inner {
        padding: 40px 0 52px;
    }

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

    .content-panel,
    .side-panel {
        padding: 22px;
    }

    .player-panel__header {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .stats-grid,
    .category-grid,
    .movie-grid,
    .movie-grid--compact,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button-primary,
    .button-secondary,
    .button-soft {
        width: 100%;
    }
}
