:root {
    color-scheme: dark;
    --bg: #080a18;
    --bg-soft: #10142a;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.14);
    --border: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.68);
    --dim: rgba(255, 255, 255, 0.46);
    --purple: #a855f7;
    --pink: #ec4899;
    --yellow: #fde68a;
    --blue: #6366f1;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(168, 85, 247, 0.28), transparent 32rem),
        radial-gradient(circle at 88% 0%, rgba(236, 72, 153, 0.22), transparent 34rem),
        linear-gradient(135deg, #080a18 0%, #111335 46%, #14091f 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(168, 85, 247, 0.24);
    background: linear-gradient(90deg, rgba(49, 46, 129, 0.94), rgba(88, 28, 135, 0.94), rgba(131, 24, 67, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    gap: 18px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #38106b;
    background: linear-gradient(135deg, #fde68a, #f9a8d4, #c4b5fd);
    box-shadow: 0 0 22px rgba(253, 230, 138, 0.42);
    font-size: 15px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.82);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.header-search,
.mobile-search,
.search-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.search-controls input,
.filter-bar input,
.filter-bar select,
.search-controls select {
    min-width: 0;
    border: 1px solid rgba(216, 180, 254, 0.34);
    border-radius: 999px;
    padding: 11px 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    outline: none;
    transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-controls input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-controls select:focus {
    border-color: rgba(216, 180, 254, 0.7);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.14);
}

.header-search button,
.mobile-search button,
.search-controls button,
.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(135deg, #9333ea, #db2777);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(147, 51, 234, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-controls button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 18px 38px rgba(236, 72, 153, 0.28);
}

.ghost-button,
.section-more {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.11);
    box-shadow: none;
}

.mobile-menu-button {
    display: none;
    border: 0;
    border-radius: 14px;
    padding: 10px 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 18px 18px;
    background: rgba(49, 16, 77, 0.96);
}

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

.mobile-nav nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

main {
    min-height: 70vh;
}

.hero-slider {
    position: relative;
    width: min(1380px, calc(100% - 28px));
    height: 620px;
    margin: 20px auto 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.55), rgba(15, 23, 42, 0.95));
    box-shadow: var(--shadow);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-image,
.detail-backdrop img,
.page-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.04);
}

.hero-image.is-hidden,
.page-hero img.is-hidden,
.detail-backdrop img.is-hidden,
.poster-image.is-hidden,
.detail-poster img.is-hidden,
.category-cover-stack img.is-hidden,
.hero-dot img.is-hidden {
    opacity: 0;
}

.hero-overlay,
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 34%, rgba(236, 72, 153, 0.2), transparent 28rem),
        linear-gradient(90deg, rgba(5, 8, 22, 0.92), rgba(31, 13, 54, 0.75) 48%, rgba(8, 10, 24, 0.42)),
        linear-gradient(0deg, rgba(8, 10, 24, 0.92), rgba(8, 10, 24, 0.06) 48%, rgba(8, 10, 24, 0.62));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 72px;
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(253, 230, 138, 0.38);
    border-radius: 999px;
    padding: 7px 12px;
    color: #fde68a;
    background: rgba(253, 230, 138, 0.1);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 0.96;
    letter-spacing: -0.05em;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero-desc,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.7);
}

.hero-meta span,
.movie-meta-line span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    border-radius: 999px;
    padding: 5px 10px;
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.16);
    font-size: 12px;
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    right: 28px;
    top: 50%;
    display: flex;
    gap: 10px;
    transform: translateY(-50%);
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    font-size: 30px;
    cursor: pointer;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 64px;
    right: 64px;
    bottom: 28px;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
}

.hero-dot {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active,
.hero-dot:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
}

.hero-dot img {
    width: 42px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-dot span {
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.section-heading h2 {
    margin: 10px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-heading p,
.muted-text {
    color: var(--muted);
    line-height: 1.7;
}

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

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

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

.movie-card,
.category-tile,
.category-overview-card,
.ranking-panel,
.text-panel,
.side-card,
.player-card,
.ranking-column {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(216, 180, 254, 0.34);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.065));
    transform: translateY(-5px);
}

.poster-shell {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 30% 20%, rgba(253, 230, 138, 0.18), transparent 11rem),
        linear-gradient(135deg, rgba(147, 51, 234, 0.58), rgba(219, 39, 119, 0.38), rgba(15, 23, 42, 0.88));
}

.poster-image,
.detail-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease, opacity 0.2s ease;
}

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

.poster-title-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h3,
.compact-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.compact-card h3 a:hover,
.ranking-list a:hover {
    color: #e9d5ff;
}

.movie-card p,
.compact-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta-line {
    margin: 0 0 10px;
}

.movie-meta-line span {
    padding: 3px 7px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 11px;
}

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

.ranking-panel,
.side-card,
.ranking-column {
    padding: 20px;
}

.panel-title,
.side-card h2,
.ranking-column h2,
.text-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.ranking-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.ranking-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #2a103f;
    background: linear-gradient(135deg, #fde68a, #f9a8d4);
    font-weight: 900;
}

.ranking-list a {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-list em {
    grid-column: 2;
    color: var(--dim);
    font-size: 13px;
    font-style: normal;
}

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

.category-tile {
    display: grid;
    min-height: 150px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    margin: 8px 0;
    color: #fde68a;
    font-size: 34px;
}

.category-tile em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

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

.page-hero {
    min-height: 310px;
    display: flex;
    align-items: center;
    padding: 56px;
}

.small-hero {
    min-height: 260px;
}

.page-hero > div:last-child {
    position: relative;
    z-index: 2;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover-stack {
    position: relative;
    min-height: 220px;
}

.category-cover-stack img {
    position: absolute;
    width: 118px;
    height: 170px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.58), rgba(219, 39, 119, 0.38));
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.35);
}

.category-cover-stack img:nth-child(1) {
    left: 0;
    top: 24px;
    z-index: 3;
}

.category-cover-stack img:nth-child(2) {
    left: 38px;
    top: 0;
    z-index: 2;
}

.category-cover-stack img:nth-child(3) {
    left: 70px;
    top: 42px;
    z-index: 1;
}

.category-overview-card h2 {
    margin: 8px 0 10px;
    font-size: 28px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.filter-bar label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.filter-count {
    border-radius: 999px;
    padding: 12px 15px;
    color: #fde68a;
    background: rgba(253, 230, 138, 0.1);
    font-weight: 800;
    white-space: nowrap;
}

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

.wide-ranking li {
    grid-template-columns: 54px minmax(0, 1fr);
}

.search-page-panel {
    min-height: 520px;
}

.search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.search-status {
    margin: 14px 0 22px;
    color: var(--muted);
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 22%, rgba(236, 72, 153, 0.2), transparent 30rem),
        linear-gradient(90deg, rgba(8, 10, 24, 0.94), rgba(8, 10, 24, 0.62), rgba(8, 10, 24, 0.88));
    backdrop-filter: blur(4px);
}

.detail-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
    min-height: 520px;
    padding: 54px;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.58), rgba(219, 39, 119, 0.38));
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

.detail-meta {
    margin: 18px 0;
}

.detail-info .primary-button {
    margin-top: 26px;
}

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

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

.player-card {
    overflow: hidden;
    padding: 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(147, 51, 234, 0.28), transparent 18rem),
        linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay.is-loading .play-trigger {
    animation: pulse 1.2s infinite;
}

.play-trigger {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #9333ea, #db2777);
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(147, 51, 234, 0.45);
}

.player-overlay strong,
.player-overlay span {
    display: block;
}

.player-overlay strong {
    font-size: 22px;
}

.player-overlay span {
    color: var(--muted);
    margin-top: 4px;
}

.text-panel {
    padding: 24px;
}

.text-panel p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.95;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--dim);
}

.side-card dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

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

.compact-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.compact-poster {
    border-radius: 16px;
}

.compact-card p {
    min-height: 0;
    margin-bottom: 0;
}

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

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(8, 10, 24, 0.72);
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
    gap: 30px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
}

.footer-shell p {
    max-width: 620px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

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

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

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

    .split-section,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        width: min(100% - 24px, 1280px);
    }

    .hero-slider {
        height: 680px;
        border-radius: 24px;
    }

    .hero-content {
        padding: 34px 24px 190px;
    }

    .hero-controls {
        top: auto;
        right: 20px;
        bottom: 110px;
        transform: none;
    }

    .hero-dots {
        left: 18px;
        right: 18px;
        bottom: 18px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-dot:nth-child(n + 5) {
        display: none;
    }

    .content-section {
        margin: 38px auto;
    }

    .section-heading,
    .footer-shell {
        grid-template-columns: 1fr;
        display: grid;
        align-items: start;
    }

    .footer-links {
        justify-content: flex-start;
    }

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

    .category-grid,
    .category-overview-grid,
    .ranking-columns {
        grid-template-columns: 1fr;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .category-cover-stack {
        min-height: 190px;
    }

    .page-hero {
        padding: 34px 24px;
        border-radius: 24px;
    }

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

    .detail-shell {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 20px;
        min-height: 480px;
        padding: 34px 22px;
    }

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

    .detail-one-line {
        font-size: 15px;
    }
}

@media (max-width: 540px) {
    .logo {
        font-size: 20px;
    }

    .logo-mark {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .mobile-search {
        display: grid;
        grid-template-columns: 1fr auto;
    }

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

    .hero-content h1,
    .page-hero h1 {
        font-size: 36px;
    }

    .hero-desc,
    .page-hero p {
        font-size: 15px;
    }

    .movie-grid,
    .latest-grid,
    .category-list-grid,
    .compact-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

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

    .movie-card p,
    .tag-row {
        display: none;
    }

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

    .detail-poster {
        width: 160px;
    }

    .play-trigger {
        width: 64px;
        height: 64px;
    }
}
