:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(168, 85, 247, 0.22);
    --line-strong: rgba(216, 180, 254, 0.42);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --purple: #a855f7;
    --purple-soft: #c084fc;
    --pink: #ec4899;
    --amber: #f59e0b;
    --green: #22c55e;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(168, 85, 247, 0.28), transparent 32rem),
        radial-gradient(circle at 92% 8%, rgba(236, 72, 153, 0.18), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

main {
    min-height: 70vh;
}

.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;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(88, 28, 135, 0.9), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.35);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: linear-gradient(90deg, #d8b4fe, #f9a8d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 12px 36px rgba(168, 85, 247, 0.38);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    color: #e2e8f0;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 310px;
}

.header-search input,
.hero-search input,
.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    border: 1px solid rgba(216, 180, 254, 0.28);
    border-radius: 14px;
    outline: none;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    transition: 0.2s ease;
}

.header-search input {
    height: 40px;
    padding: 0 14px;
}

.header-search input:focus,
.hero-search input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: rgba(216, 180, 254, 0.8);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.16);
}

.header-search button,
.hero-search button {
    border: 0;
    border-radius: 14px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 14px 38px rgba(168, 85, 247, 0.32);
}

.header-search button {
    height: 40px;
    padding: 0 16px;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

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

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

.mobile-links,
.mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-category-links {
    margin-top: 10px;
}

.mobile-category-links a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d8b4fe;
    background: rgba(255, 255, 255, 0.06);
}

.hero-section {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
}

.hero-shell {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 34px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: center;
    padding: 62px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: scale(1.02);
}

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

.hero-backdrop,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.15);
}

.hero-backdrop::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.22), transparent 24rem),
        radial-gradient(circle at 76% 30%, rgba(168, 85, 247, 0.24), transparent 22rem);
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #f0abfc;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    line-height: 1.05;
    font-size: clamp(2.6rem, 6vw, 6.4rem);
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-meta {
    margin: 20px 0 0;
    color: #e9d5ff;
    font-weight: 700;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 740px;
    color: #e2e8f0;
    font-size: 1.08rem;
    line-height: 1.86;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 18px 48px rgba(168, 85, 247, 0.35);
}

.ghost-button {
    border: 1px solid rgba(216, 180, 254, 0.32);
    color: #f5f3ff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.ghost-button.small {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 12px;
}

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

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 60px;
    bottom: 38px;
    z-index: 2;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    width: 72px;
    background: linear-gradient(90deg, var(--purple), var(--pink));
}

.hero-quick-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
    gap: 18px;
    margin-top: -58px;
    padding: 0 34px;
    position: relative;
    z-index: 5;
}

.hero-search,
.hero-stats {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.3);
}

.hero-search {
    padding: 22px;
}

.hero-search label {
    display: block;
    margin-bottom: 10px;
    color: #e9d5ff;
    font-weight: 900;
}

.hero-search div {
    display: flex;
    gap: 12px;
}

.hero-search input {
    height: 52px;
    padding: 0 18px;
}

.hero-search button {
    min-width: 110px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
}

.hero-stats a {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 112px;
    border-right: 1px solid var(--line);
}

.hero-stats a:last-child {
    border-right: 0;
}

.hero-stats strong {
    font-size: 1.8rem;
    color: white;
}

.hero-stats span {
    color: var(--subtle);
    font-size: 0.86rem;
}

.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 72px auto;
}

.section-heading,
.sidebar-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-heading h2,
.sidebar-title span,
.text-card h2 {
    margin: 0;
    color: white;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-action a,
.sidebar-title a {
    color: #d8b4fe;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.92)),
        var(--tile-image) center / cover;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.25);
    transition: 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.compact-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(216, 180, 254, 0.65);
}

.category-tile span,
.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile span {
    font-size: 1.35rem;
    font-weight: 950;
}

.category-tile strong {
    margin: 8px 0;
    color: #f0abfc;
}

.category-tile small {
    color: #e2e8f0;
    line-height: 1.6;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
    transition: 0.22s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #111827;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.28s ease;
}

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

.poster-overlay {
    position: absolute;
    inset: auto 14px 14px;
    display: inline-flex;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 14px;
    color: white;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.72);
    opacity: 0;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.movie-card:hover .poster-overlay {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.36);
}

.card-content {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #c4b5fd;
    font-size: 0.78rem;
    font-weight: 800;
}

.card-content h3 {
    margin: 10px 0 8px;
    color: white;
    font-size: 1.06rem;
    line-height: 1.35;
}

.card-content p {
    min-height: 58px;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags a {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid rgba(216, 180, 254, 0.22);
    border-radius: 999px;
    color: #e9d5ff;
    font-size: 0.75rem;
    background: rgba(168, 85, 247, 0.12);
}

.ranking-sidebar {
    position: sticky;
    top: 96px;
}

.sidebar-card,
.text-card,
.filter-toolbar,
.category-overview-card,
.hero-rank-panel,
.prev-next-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
}

.sidebar-card {
    padding: 20px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(216, 180, 254, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    transition: 0.2s ease;
}

.compact-card img {
    width: 54px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.compact-card strong,
.compact-card small {
    display: block;
}

.compact-card strong {
    color: white;
    line-height: 1.35;
}

.compact-card small {
    margin-top: 5px;
    color: var(--subtle);
    line-height: 1.4;
}

.mini-rank {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.page-hero,
.detail-hero {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(88, 28, 135, 0.45));
    box-shadow: var(--shadow);
}

.compact-page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
    align-items: center;
    padding: 48px;
}

.compact-page-hero > div,
.hero-rank-panel {
    position: relative;
    z-index: 1;
}

.ranking-hero {
    min-height: 420px;
}

.hero-rank-panel {
    padding: 16px;
}

.category-overview-grid {
    display: grid;
    gap: 20px;
}

.category-overview-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
    gap: 24px;
    overflow: hidden;
    padding: 26px;
    transition: 0.22s ease;
}

.category-overview-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72)),
        var(--overview-image) center / cover;
    opacity: 0.78;
}

.category-overview-card > * {
    position: relative;
    z-index: 1;
}

.category-overview-card h2 {
    margin: 0;
    font-size: 2rem;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.small-list .compact-card {
    grid-template-columns: auto 44px minmax(0, 1fr);
}

.small-list .compact-card img {
    width: 44px;
    height: 60px;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
}

.filter-toolbar input,
.filter-toolbar select {
    height: 48px;
    padding: 0 16px;
}

.filter-toolbar select {
    color: #f8fafc;
}

.filter-toolbar option {
    color: #111827;
}

.filter-count {
    color: #d8b4fe;
    font-weight: 900;
    white-space: nowrap;
}

.detail-hero {
    min-height: 560px;
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 56px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: #d8b4fe;
    font-weight: 800;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
}

.meta-grid div {
    padding: 14px;
    border: 1px solid rgba(216, 180, 254, 0.2);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.meta-grid dt {
    color: var(--subtle);
    font-size: 0.8rem;
}

.meta-grid dd {
    margin: 4px 0 0;
    color: white;
    font-weight: 900;
}

.player-section {
    margin-top: 48px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.72));
    transition: 0.2s ease;
}

.video-play-button span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 22px 56px rgba(168, 85, 247, 0.42);
    font-size: 2rem;
}

.video-play-button strong {
    font-size: 1.15rem;
}

.video-shell.playing .video-play-button {
    opacity: 0;
    pointer-events: none;
}

.video-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 999px;
    color: #e9d5ff;
    font-size: 0.86rem;
    background: rgba(2, 6, 23, 0.72);
}

.video-shell.playing .video-status {
    display: none;
}

.detail-text-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.text-card {
    padding: 28px;
}

.text-card p {
    color: var(--muted);
    line-height: 1.92;
    font-size: 1.02rem;
}

.prev-next-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.prev-next-card {
    padding: 22px;
    transition: 0.2s ease;
}

.prev-next-card span,
.prev-next-card strong {
    display: block;
}

.prev-next-card span {
    color: #d8b4fe;
    font-weight: 900;
}

.prev-next-card strong {
    margin-top: 6px;
    color: white;
    font-size: 1.3rem;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.8fr 1fr;
    gap: 28px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 1rem;
}

.footer-grid p,
.footer-grid a {
    color: var(--subtle);
    line-height: 1.7;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 8px;
}

.footer-categories {
    columns: 2;
}

.copyright {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

    .mobile-menu-button {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-slide,
    .detail-layout,
    .compact-page-hero,
    .split-layout,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .hero-quick-panel {
        grid-template-columns: 1fr;
        padding: 0 18px;
    }

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

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

    .ranking-sidebar {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        width: min(100% - 22px, 1280px);
        height: 64px;
    }

    .hero-section,
    .content-section,
    .page-hero,
    .detail-hero,
    .mobile-panel {
        width: min(100% - 22px, 1280px);
    }

    .hero-shell {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 34px 24px 84px;
    }

    .hero-controls {
        left: 24px;
        bottom: 28px;
    }

    .hero-search div,
    .prev-next-section,
    .detail-text-section,
    .meta-grid,
    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .hero-search div {
        display: grid;
    }

    .hero-search button {
        min-height: 48px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-stats a {
        min-height: 78px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

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

    .compact-page-hero,
    .detail-layout {
        padding: 28px;
    }

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

    .section-heading,
    .sidebar-title {
        display: grid;
        align-items: start;
    }

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

@media (max-width: 520px) {
    .site-logo span:last-child {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 2.35rem;
    }

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

    .card-content p {
        min-height: auto;
    }

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