:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --border: rgba(14, 165, 233, 0.2);
    --border-soft: rgba(14, 165, 233, 0.1);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --sky: #38bdf8;
    --cyan: #22d3ee;
    --amber: #fbbf24;
    --emerald: #34d399;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
    --radius: 22px;
    --radius-sm: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 15%, rgba(34, 211, 238, 0.1), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.88));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(14, 116, 144, 0.16);
}

.nav-wrap {
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
    transform: rotate(-8deg);
}

.brand-text,
.footer-brand span:last-child {
    font-size: 20px;
    background: linear-gradient(90deg, var(--sky), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.desktop-nav > a,
.nav-dropdown > button {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    padding: 9px 0;
    transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.active,
.nav-dropdown > button:hover {
    color: var(--sky);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: -18px;
    width: 210px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.18s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
}

.dropdown-menu a:hover {
    color: var(--sky);
    background: rgba(14, 165, 233, 0.12);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
}

.nav-search input,
.mobile-search input {
    width: 220px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    padding: 8px 12px;
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.filter-panel input::placeholder {
    color: var(--muted-2);
}

.nav-search button,
.mobile-search button,
.filter-panel button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fff;
    background: linear-gradient(90deg, #0284c7, #06b6d4);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel a {
    display: block;
    padding: 10px 12px;
    color: #dbeafe;
    border-radius: 12px;
}

.mobile-panel a:hover {
    color: var(--sky);
    background: rgba(14, 165, 233, 0.1);
}

.mobile-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 6px 0 12px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
}

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 72vh;
    height: 720px;
    max-height: 860px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    filter: saturate(1.1) contrast(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.86) 38%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    padding-top: 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
    align-items: center;
    gap: 44px;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.home-intro p,
.section-heading p,
.page-hero p:first-child {
    margin: 0 0 12px;
    color: var(--sky);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: #fff;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.48);
}

.hero-text {
    margin: 24px 0 0;
    max-width: 680px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-tags,
.tag-row,
.detail-meta-line,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta-line span,
.rank-meta span {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, #0284c7, #06b6d4);
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.35);
}

.ghost-btn,
.text-link {
    border: 1px solid var(--border);
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.55);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.rank-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.3);
}

.hero-poster {
    position: relative;
    width: min(100%, 420px);
    aspect-ratio: 2 / 3;
    justify-self: end;
    border-radius: 34px;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.32);
    box-shadow: 0 30px 100px rgba(14, 116, 144, 0.45);
    transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(14px);
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-arrow:hover {
    background: rgba(14, 165, 233, 0.28);
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.25);
}

.hero-dot.active {
    background: linear-gradient(90deg, var(--sky), var(--cyan));
}

.home-intro,
.content-section,
.page-hero,
.category-list-page,
.breadcrumb,
.detail-layout {
    width: min(1200px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.home-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -52px;
    position: relative;
    z-index: 10;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-intro h2,
.section-heading h2,
.page-hero h1 {
    margin: 0;
    color: #fff;
    letter-spacing: -0.03em;
}

.home-intro h2 {
    font-size: clamp(24px, 3vw, 42px);
}

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

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

.section-heading h2 {
    font-size: clamp(26px, 3vw, 40px);
}

.section-heading > a {
    color: var(--sky);
    font-weight: 700;
}

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

.movie-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 55px rgba(2, 6, 23, 0.32);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 28px 80px rgba(8, 47, 73, 0.48);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(2, 6, 23, 0.9));
}

.poster-link img,
.related-card img,
.rank-cover img,
.category-cover-stack img,
.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.rating-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(90deg, #fbbf24, #fde68a);
    font-size: 13px;
    font-weight: 900;
}

.play-float {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(14, 165, 233, 0.88);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.38);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: var(--muted-2);
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-copy h3 a:hover,
.related-card h3 a:hover,
.category-card h2 a:hover {
    color: var(--sky);
}

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

.tag-row span {
    font-size: 12px;
    padding: 4px 8px;
}

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

.category-tile {
    min-height: 156px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.2), transparent 55%),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.5);
}

.category-tile span {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.category-tile small {
    color: var(--muted);
    line-height: 1.65;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.66);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    box-shadow: 0 14px 34px rgba(14, 165, 233, 0.26);
}

.rank-cover {
    width: 86px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

.rank-copy h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
}

.rank-copy p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-action {
    min-height: 38px;
    color: #e0f2fe;
    border: 1px solid var(--border);
}

.page-main {
    padding-top: 88px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 54px;
    border: 1px solid var(--border);
    border-radius: 32px;
    background:
        radial-gradient(circle at 15% 0%, rgba(14, 165, 233, 0.24), transparent 36rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.72));
    box-shadow: var(--shadow);
}

.small-hero {
    margin-top: 26px;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p:last-child {
    max-width: 760px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

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

.category-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--border-soft);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.68);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.8);
}

.category-card h2 {
    margin: 4px 0 10px;
    color: #fff;
    font-size: 26px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px 170px auto;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: rgba(2, 6, 23, 0.62);
    padding: 0 12px;
}

.filter-panel button {
    align-self: end;
    height: 44px;
}

.empty-state {
    margin: 20px 0;
    padding: 22px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.58);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-top: 26px;
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--sky);
}

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

.detail-primary,
.detail-side {
    display: grid;
    gap: 22px;
}

.watch-panel,
.detail-copy,
.side-card {
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.28);
}

.watch-panel {
    padding: 14px;
}

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    overflow: hidden;
    color: #fff;
    background: #020617;
    z-index: 4;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.72) saturate(1.08);
}

.player-dim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 38%, rgba(14, 165, 233, 0.16), transparent 22rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.2));
}

.play-bubble {
    position: absolute;
    left: 50%;
    top: 44%;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    box-shadow: 0 22px 55px rgba(14, 165, 233, 0.45);
    transform: translate(-50%, -50%);
    font-size: 30px;
}

.player-cover strong,
.player-cover em {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    text-align: center;
}

.player-cover strong {
    bottom: 70px;
    font-size: clamp(24px, 4vw, 42px);
}

.player-cover em {
    bottom: 40px;
    color: #cbd5e1;
    font-style: normal;
}

.detail-copy {
    padding: 30px;
}

.detail-copy h1 {
    margin: 18px 0 14px;
    color: #fff;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-lead {
    margin: 0 0 18px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.75;
}

.detail-tags {
    margin-bottom: 26px;
}

.detail-copy section {
    margin-top: 30px;
}

.detail-copy h2,
.side-card h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
}

.detail-copy p {
    color: var(--muted);
    line-height: 1.9;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.info-list div {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.35);
}

.info-list dt {
    color: var(--muted-2);
    font-size: 13px;
}

.info-list dd {
    margin: 6px 0 0;
    color: #e0f2fe;
}

.info-list a:hover {
    color: var(--sky);
}

.side-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.side-card {
    padding: 20px;
}

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

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

.related-card > a {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.8);
}

.related-card > a span {
    position: absolute;
    inset: auto 8px 8px auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(14, 165, 233, 0.86);
}

.related-card h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
}

.related-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 84px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0.95));
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.75;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 17px;
}

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

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

.footer-grid a:hover {
    color: var(--sky);
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 32px;
    border-top: 1px solid var(--border-soft);
    text-align: center;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-poster {
        display: none;
    }

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

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

    .compact-rank-list {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 860px) {
    .hero {
        height: 680px;
    }

    .hero-content {
        padding-top: 96px;
    }

    .hero-text {
        font-size: 16px;
        -webkit-line-clamp: 4;
    }

    .hero-arrow {
        display: none;
    }

    .home-intro,
    .section-heading {
        display: block;
    }

    .home-intro .primary-btn,
    .section-heading > a {
        margin-top: 18px;
    }

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

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

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

    .rank-item {
        grid-template-columns: 48px 74px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 2 / -1;
        justify-self: start;
    }

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

    .side-poster {
        display: none;
    }

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

@media (max-width: 620px) {
    .nav-wrap {
        width: calc(100% - 22px);
    }

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

    .hero {
        min-height: 680px;
        height: 86vh;
    }

    .hero-content,
    .home-intro,
    .content-section,
    .page-hero,
    .category-list-page,
    .breadcrumb,
    .detail-layout {
        width: calc(100% - 22px);
    }

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

    .hero-actions {
        gap: 10px;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .home-intro,
    .page-hero,
    .detail-copy {
        padding: 22px;
        border-radius: 22px;
    }

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

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

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

    .category-cover-stack {
        grid-template-columns: repeat(4, 1fr);
    }

    .card-body {
        padding: 12px;
    }

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

    .rank-item {
        grid-template-columns: 42px 68px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .rank-num {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 13px;
    }

    .rank-cover {
        width: 68px;
    }

    .rank-copy h3 {
        font-size: 16px;
    }

    .rank-copy p {
        display: none;
    }

    .play-bubble {
        width: 58px;
        height: 58px;
        font-size: 22px;
    }
}
