:root {
    --bg: #f7fafc;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --red: #ef4444;
    --yellow: #facc15;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #f7fafc 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.brand-text {
    font-size: 20px;
    white-space: nowrap;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid rgba(209, 213, 219, 0.85);
    border-radius: 999px;
    background: #fff;
}

.header-search input,
.mobile-search input,
.home-search-band input,
.filter-panel input,
.filter-panel select {
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
}

.header-search input {
    width: 190px;
    padding: 8px 2px 8px 12px;
}

.header-search button,
.mobile-search button,
.home-search-band button {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    cursor: pointer;
    font-weight: 800;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.32;
    transform: scale(1.08);
    filter: saturate(1.15);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 35%, rgba(20, 184, 166, 0.42), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.75) 52%, rgba(6, 182, 212, 0.42));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 56px;
    padding: 64px 0;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--yellow);
    font-weight: 900;
    letter-spacing: 0.02em;
}

.hero-copy h1,
.page-hero h1,
.detail-title-box h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 720px;
    margin: 24px 0 0;
    font-size: 20px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags {
    margin: 24px 0 0;
}

.hero-tags span,
.detail-tags span,
.movie-card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

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

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

.primary-button,
.ghost-button,
.section-more,
.category-preview-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 15px 28px;
    color: var(--primary);
    background: #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.ghost-button {
    padding: 15px 24px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.category-preview-head a:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    position: relative;
    display: block;
    min-height: 500px;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255,255,255,0.24), rgba(255,255,255,0.06));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 44%, rgba(0,0,0,0.58));
}

.hero-poster-play,
.card-play {
    position: absolute;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    z-index: 3;
}

.hero-poster-play {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

.home-search-band,
.content-section,
.filter-panel,
.detail-content-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-band {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 560px);
    gap: 26px;
    align-items: center;
    margin-top: -48px;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-band h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.home-search-band p {
    margin: 0;
    color: var(--muted);
}

.home-search-band form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.home-search-band input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
}

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

.section-heading,
.category-preview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.section-heading > div,
.category-preview-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-preview-head > div {
    display: block;
}

.section-heading h2,
.category-preview-head h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 34px);
    letter-spacing: -0.04em;
}

.category-preview-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.section-more,
.category-preview-head a {
    padding: 10px 16px;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.movie-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.movie-card-compact .movie-card-cover {
    aspect-ratio: 16 / 10;
}

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

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

.card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.78));
}

.card-category,
.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.card-category {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    background: rgba(37, 99, 235, 0.92);
}

.card-duration {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    justify-content: center;
    background: linear-gradient(135deg, var(--red), #f97316);
}

.card-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card-body {
    padding: 18px;
}

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

.movie-card-body h3 a:hover {
    color: var(--primary);
}

.movie-card-meta,
.movie-card-desc {
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.movie-card-desc {
    min-height: 46px;
}

.movie-card-tags {
    margin-top: 14px;
}

.movie-card-tags span {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.09);
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 26px;
    background: linear-gradient(135deg, #1d4ed8, #14b8a6);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile-bg,
.category-tile-shade {
    position: absolute;
    inset: 0;
}

.category-tile-bg {
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    transition: transform 0.45s ease;
}

.category-tile:hover .category-tile-bg {
    transform: scale(1.08);
}

.category-tile-shade {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.82));
}

.category-tile-body {
    position: absolute;
    inset: auto 18px 18px 18px;
    color: #fff;
}

.category-tile-body strong,
.category-tile-body em,
.category-tile-body small {
    display: block;
}

.category-tile-body strong {
    font-size: 24px;
}

.category-tile-body em {
    margin-top: 7px;
    font-style: normal;
    color: rgba(255,255,255,0.86);
}

.category-tile-body small {
    margin-top: 9px;
    line-height: 1.55;
    color: rgba(255,255,255,0.76);
}

.ranking-section .ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 42px 88px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), #f97316);
    font-weight: 900;
}

.ranking-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.ranking-img {
    width: 88px;
    height: 56px;
    object-fit: cover;
}

.ranking-info {
    min-width: 0;
}

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

.ranking-info em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.ranking-play {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--primary);
    border-radius: 999px;
    background: rgba(37,99,235,0.1);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0;
    color: #fff;
    background: radial-gradient(circle at 68% 25%, rgba(250,204,21,0.22), transparent 28%), linear-gradient(135deg, #1d4ed8, #06b6d4 60%, #14b8a6);
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 150px 160px;
    gap: 14px;
    align-items: end;
    margin-top: 32px;
    padding: 18px;
    border: 1px solid rgba(229,231,235,0.9);
    border-radius: 24px;
    background: rgba(255,255,255,0.92);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(12px);
}

.filter-panel label,
.filter-result {
    display: grid;
    gap: 8px;
}

.filter-panel span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.filter-result {
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--primary);
    background: rgba(37,99,235,0.09);
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 54px 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 24px;
    background: #fff;
}

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

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

.rank-table {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
}

.rank-table-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1.6fr) 150px 90px 120px;
    gap: 12px;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}

.rank-table-row:last-child {
    border-bottom: 0;
}

.rank-table-row:hover {
    color: var(--primary);
    background: rgba(37,99,235,0.05);
}

.rank-table-row strong,
.rank-table-row em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-table-row em {
    color: var(--muted);
    font-style: normal;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-bg {
    background-size: cover;
    background-position: center;
    opacity: 0.26;
    filter: blur(1px) saturate(1.1);
    transform: scale(1.04);
}

.detail-shade {
    background: linear-gradient(90deg, rgba(15,23,42,0.96), rgba(37,99,235,0.78), rgba(20,184,166,0.52));
}

.detail-hero-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 54px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: rgba(255,255,255,0.82);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: stretch;
}

.player-panel {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 34px 80px rgba(0,0,0,0.34);
}

.movie-player {
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: #020617;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(37,99,235,0.18), rgba(2,6,23,0.38));
    cursor: pointer;
}

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

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.24);
    border: 1px solid rgba(255,255,255,0.34);
    backdrop-filter: blur(12px);
    font-size: 34px;
}

.play-overlay strong {
    display: block;
    font-size: 20px;
}

.detail-info-card {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 30px;
    background: rgba(255,255,255,0.13);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
}

.detail-poster {
    aspect-ratio: 16 / 11;
    background: linear-gradient(135deg, #1d4ed8, #14b8a6);
}

.detail-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-title-box {
    padding: 22px;
}

.detail-title-box h1 {
    font-size: 34px;
}

.detail-title-box p:not(.eyebrow) {
    color: rgba(255,255,255,0.84);
    line-height: 1.75;
}

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

.detail-main,
.detail-side-ranking .content-section {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.detail-main {
    padding: 28px;
}

.detail-tags span {
    color: var(--primary);
    background: rgba(37,99,235,0.09);
}

.detail-meta-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 24px 0 30px;
    list-style: none;
}

.detail-meta-list li {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.detail-meta-list span,
.detail-meta-list strong {
    display: block;
}

.detail-meta-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta-list strong {
    margin-top: 5px;
    line-height: 1.45;
}

.detail-main h2 {
    margin: 28px 0 12px;
    font-size: 26px;
}

.detail-main p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

.detail-side-ranking .content-section {
    width: 100%;
    margin: 0;
    padding: 22px;
}

.detail-side-ranking .ranking-section .ranking-list {
    grid-template-columns: 1fr;
}

.detail-side-ranking .section-heading {
    margin-bottom: 16px;
}

.detail-side-ranking .section-more {
    display: none;
}

.detail-side-ranking .ranking-row {
    grid-template-columns: 36px 74px minmax(0, 1fr);
}

.detail-side-ranking .ranking-play {
    display: none;
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.site-footer {
    margin-top: 72px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #1d4ed8 72%, #0f766e);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    padding: 46px 0;
}

.footer-shell p {
    max-width: 660px;
    color: rgba(255,255,255,0.78);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 12px;
}

.footer-links a {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.68);
}

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

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

    .hero-content,
    .detail-layout,
    .detail-content-shell,
    .home-search-band {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        min-height: 360px;
    }

    .hero-poster-img {
        height: 360px;
    }

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

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

    .ranking-section .ranking-list,
    .footer-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .header-shell {
        height: 66px;
    }

    .brand-text {
        font-size: 18px;
    }

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

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

    .hero-summary {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-band {
        margin-top: -28px;
        padding: 20px;
    }

    .home-search-band form,
    .mobile-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 20px;
    }

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

    .movie-card-body {
        padding: 14px;
    }

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

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

    .rank-table-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-table-row em {
        display: none;
    }

    .player-panel,
    .movie-player {
        min-height: 300px;
    }

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

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

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