:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(14, 165, 233, 0.22);
    --line-strong: rgba(56, 189, 248, 0.52);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #64748b;
    --sky: #38bdf8;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(2, 132, 199, 0.18);
    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 12% 0%, rgba(14, 165, 233, 0.20), transparent 32rem),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.13), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

button,
input {
    font: inherit;
}

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

.site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.92));
    box-shadow: 0 16px 45px rgba(3, 7, 18, 0.42);
    backdrop-filter: blur(18px);
}

.nav-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    color: white;
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.36);
    font-size: 14px;
}

.logo-text {
    font-size: 20px;
    background: linear-gradient(90deg, var(--sky), #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links > a,
.nav-dropdown > button {
    color: #cbd5e1;
    font-size: 15px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 12px);
    width: 180px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 8px);
}

.nav-search,
.mobile-search,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-page-form input,
.toolbar-search input {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: var(--text);
    outline: 0;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
    width: 260px;
    padding: 11px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.toolbar-search input:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
    background: rgba(15, 23, 42, 0.95);
}

.nav-search button,
.mobile-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    background: linear-gradient(90deg, #0ea5e9, #22d3ee);
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

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

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.98);
    padding: 16px 24px 22px;
}

.mobile-menu.is-open {
    display: grid;
    gap: 14px;
}

.mobile-menu a {
    color: #cbd5e1;
}

.mobile-category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 8px 0;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
}

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

.hero-carousel {
    position: relative;
    min-height: 620px;
    height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(14, 165, 233, 0.24), transparent 24rem),
        linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 38%, rgba(2, 6, 23, 0.42) 68%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 28%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    top: 50%;
    transform: translateY(-48%);
    max-width: 720px;
    padding-right: 24px;
}

.hero-kicker,
.section-kicker,
.detail-kicker,
.sub-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--sky);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 16px;
}

.hero-content h1 {
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: white;
}

.hero-content h2 {
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.08;
    color: #f8fafc;
}

.hero-content p {
    margin: 0 0 22px;
    max-width: 640px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.chip-row button {
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    color: #bae6fd;
}

.hero-tags span {
    padding: 7px 13px;
    backdrop-filter: blur(10px);
    font-size: 14px;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.toolbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-btn {
    padding: 15px 28px;
    background: linear-gradient(90deg, #0ea5e9, #22d3ee);
    color: white;
    box-shadow: 0 16px 42px rgba(14, 165, 233, 0.35);
}

.ghost-btn {
    padding: 14px 26px;
    color: white;
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.toolbar-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.55);
    color: white;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 16px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.58);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--sky);
}

.hero-category-links {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 620px;
}

.hero-category-links a {
    padding: 9px 13px;
    border: 1px solid rgba(56, 189, 248, 0.20);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    color: #dbeafe;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

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

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

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

.section-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 10px 0 0;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
}

.section-link,
.toolbar-link {
    padding: 10px 16px;
    border: 1px solid var(--line);
    color: var(--sky);
    background: rgba(14, 165, 233, 0.08);
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card[hidden] {
    display: none;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48));
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 22px 58px rgba(14, 165, 233, 0.18);
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    margin: 0;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

.movie-card-link:hover img {
    transform: scale(1.08);
    filter: saturate(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.18) 48%, rgba(2, 6, 23, 0.02) 100%);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.86);
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.82);
    color: white;
    opacity: 0;
    transition: all 0.25s ease;
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.32);
}

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

.poster-year {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(2, 6, 23, 0.72);
    color: #cbd5e1;
    font-size: 12px;
}

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

.movie-card-body h3 {
    min-height: 44px;
    margin: 0 0 10px;
    color: #e2e8f0;
    font-size: 16px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
    color: var(--sky);
}

.movie-card-body p {
    min-height: 42px;
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.6;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #475569;
}

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 250px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x proximity;
}

.rail-card {
    scroll-snap-align: start;
}

.rank-section,
.rank-page-section {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(30, 41, 59, 0.32));
    padding: 34px;
    box-shadow: var(--shadow);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(14, 165, 233, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    background: rgba(15, 23, 42, 0.86);
}

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

.rank-item img {
    width: 58px;
    height: 82px;
    object-fit: cover;
    border-radius: 10px;
}

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

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

.rank-info strong {
    color: #f8fafc;
    font-size: 15px;
}

.rank-info em {
    margin-top: 6px;
    color: var(--soft);
    font-style: normal;
    font-size: 12px;
}

.rank-score {
    color: #fbbf24;
    font-weight: 900;
}

.sub-hero {
    position: relative;
    overflow: hidden;
    padding: 90px max(24px, calc((100vw - 1280px) / 2 + 24px)) 70px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.18), transparent 25rem),
        linear-gradient(135deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72));
}

.sub-hero h1 {
    margin: 0;
    color: white;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.sub-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.category-tile a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.66);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile a:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 10px;
}

.category-thumbs img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-tile-body {
    padding: 10px 20px 22px;
}

.category-tile-body h2 {
    margin: 0 0 10px;
    color: white;
}

.category-tile-body p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.category-tile-body span {
    color: var(--sky);
    font-weight: 800;
}

.library-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.library-toolbar.stacked {
    display: grid;
    align-items: stretch;
}

.toolbar-search {
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
}

.toolbar-search input {
    width: min(100%, 420px);
    padding: 14px 18px;
}

.toolbar-search.wide input {
    width: min(100%, 720px);
}

.chip-row button {
    padding: 9px 13px;
    cursor: pointer;
}

.chip-row button.is-active {
    background: linear-gradient(90deg, #0ea5e9, #22d3ee);
    color: white;
}

.empty-state {
    padding: 34px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
    text-align: center;
}

.search-page-form {
    max-width: 720px;
    margin-top: 26px;
}

.search-page-form input {
    flex: 1;
    min-width: 0;
    padding: 15px 18px;
}

.detail-main {
    padding-bottom: 48px;
}

.detail-wrap {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

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

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

.player-card,
.detail-panel,
.text-panel,
.sidebar-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 16px 46px rgba(2, 6, 23, 0.24);
}

.player-card {
    overflow: hidden;
}

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

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.54));
    color: white;
    cursor: pointer;
    font-weight: 900;
    font-size: 18px;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.36);
    font-size: 32px;
}

.detail-panel,
.text-panel,
.sidebar-card {
    padding: 24px;
}

.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.detail-title-row h1 {
    margin: 0;
    color: white;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-badge {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #22d3ee);
    color: white;
    font-weight: 900;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
}

.detail-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-tags a {
    padding: 7px 11px;
    font-size: 13px;
}

.detail-one-line {
    margin: 20px 0 0;
    padding: 18px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 18px;
    background: rgba(14, 165, 233, 0.08);
    color: #bae6fd;
    line-height: 1.8;
}

.text-panel h2,
.sidebar-card h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 22px;
}

.text-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 2;
}

.highlight-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.45));
}

.detail-sidebar {
    position: sticky;
    top: 92px;
}

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

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

.side-related img {
    width: 74px;
    height: 106px;
    object-fit: cover;
    border-radius: 12px;
}

.side-related strong,
.side-related em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-related strong {
    color: #e2e8f0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-related:hover strong {
    color: var(--sky);
}

.side-related em {
    margin-top: 6px;
    color: var(--soft);
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.more-section {
    padding-top: 34px;
}

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

.footer-inner {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 30px;
}

.footer-brand p,
.footer-col p,
.footer-col a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.7;
}

.footer-col h3 {
    margin: 0 0 14px;
    color: #f8fafc;
}

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

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

.footer-bottom {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(14, 165, 233, 0.12);
    text-align: center;
    font-size: 13px;
}

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

    .mobile-toggle {
        display: block;
    }

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

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

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

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

    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-inner {
        padding: 0 16px;
    }

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

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

    .hero-content {
        left: 20px;
        right: 20px;
        top: 46%;
        max-width: none;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-category-links {
        left: 20px;
        right: 20px;
        bottom: 70px;
    }

    .content-wrap,
    .detail-wrap,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 32px, 1280px);
    }

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

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

    .rank-section,
    .rank-page-section {
        padding: 22px;
    }

    .section-head,
    .library-toolbar,
    .detail-title-row {
        display: grid;
    }

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

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

    .sub-hero {
        padding: 70px 20px 52px;
    }

    .search-page-form {
        display: grid;
    }
}

@media (max-width: 520px) {
    .movie-card-body {
        padding: 13px;
    }

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

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

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

    .rank-score {
        display: none;
    }

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

    .side-related img {
        width: 64px;
        height: 92px;
    }
}
