* {
    box-sizing: border-box;
}

:root {
    --bg: #f9fafb;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --white: #ffffff;
    --orange: #ea580c;
    --orange-dark: #c2410c;
    --red: #dc2626;
    --blue: #2563eb;
    --pink: #db2777;
    --purple: #7c3aed;
    --cyan: #0891b2;
    --green: #16a34a;
    --gold: #ca8a04;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 25px 55px rgba(15, 23, 42, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(135deg, #ea580c, #dc2626 55%, #111827);
    box-shadow: 0 10px 35px rgba(127, 29, 29, 0.25);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

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

.nav-link,
.mobile-nav-link {
    font-weight: 650;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #fed7aa;
    opacity: 1;
}

.top-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 290px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.top-search input,
.mobile-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 10px 14px;
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.top-search button,
.mobile-search button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    padding: 10px 16px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: #ffffff;
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.mobile-search {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000000;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.56) 45%, rgba(0, 0, 0, 0.2)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 50px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
}

.hero-copy {
    max-width: 760px;
    padding-top: 60px;
}

.hero-tags,
.hero-subtags,
.detail-tags-top,
.detail-genre-list,
.detail-tag-list,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.hero-subtags span,
.detail-tags-top span,
.detail-tags-top a,
.detail-genre-list span,
.detail-tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 14px;
    font-weight: 700;
}

.hero-tags span:first-child {
    background: #dc2626;
}

.hero-tags span:last-child,
.hero-subtags span {
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.12);
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 20px;
}

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

.primary-button,
.ghost-button,
.category-enter,
.search-page-form button,
.quick-search-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.category-enter,
.search-page-form button,
.quick-search-panel button {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 16px 35px rgba(234, 88, 12, 0.28);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.category-enter:hover,
.search-page-form button:hover,
.quick-search-panel button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    display: block;
    width: 280px;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-strong);
    transform: rotate(2deg);
}

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

.hero-dots {
    position: absolute;
    right: calc((100% - min(1280px, calc(100% - 32px))) / 2);
    bottom: 34px;
    display: flex;
    gap: 9px;
    z-index: 5;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-search-panel {
    width: min(1180px, calc(100% - 32px));
    margin: -38px auto 0;
    position: relative;
    z-index: 6;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-strong);
    padding: 22px;
}

.quick-search-panel form,
.search-page-form {
    display: flex;
    gap: 12px;
}

.quick-search-panel input,
.search-page-form input,
.filter-panel input,
.filter-panel select,
.ranking-filter {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: 0;
    background: #ffffff;
    padding: 13px 15px;
    color: var(--text);
}

.quick-links {
    margin-top: 16px;
}

.quick-links a {
    color: #ea580c;
    border-radius: 999px;
    background: #fff7ed;
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 700;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ea580c;
    font-weight: 800;
}

.section-more span {
    font-size: 24px;
    line-height: 1;
}

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

.category-tile,
.category-detail-card,
.soft-panel,
.rank-panel,
.detail-card,
.player-card,
.sticky-panel,
.quick-search-panel,
.filter-panel,
.rank-search-panel {
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-tile {
    min-height: 210px;
    border-radius: 28px;
    padding: 24px;
    overflow: hidden;
    position: relative;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.08;
}

.category-tile:hover,
.movie-card:hover,
.mini-card:hover,
.category-detail-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.category-tile span,
.category-detail-body span {
    display: inline-flex;
    border-radius: 999px;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 800;
    background: currentColor;
    filter: saturate(1.4);
}

.category-tile h3,
.category-detail-body h2 {
    margin: 18px 0 10px;
    font-size: 24px;
}

.category-tile p,
.category-detail-body p,
.footer-inner p {
    margin: 0;
    color: var(--muted);
}

.category-tile small {
    display: block;
    margin-top: 18px;
    color: #9ca3af;
    font-weight: 650;
}

.accent-orange,
.orange-hero {
    color: #ea580c;
}

.accent-red,
.red-hero {
    color: #dc2626;
}

.accent-blue {
    color: #2563eb;
}

.accent-pink {
    color: #db2777;
}

.accent-purple {
    color: #7c3aed;
}

.accent-cyan {
    color: #0891b2;
}

.accent-green {
    color: #16a34a;
}

.accent-gold {
    color: #ca8a04;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
    display: none;
}

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

.movie-poster img,
.mini-card img,
.related-card img,
.ranking-row img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-poster img,
.mini-card img,
.related-card img,
.category-cover-stack img {
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img,
.mini-card:hover img,
.related-card:hover img,
.category-cover-stack:hover img {
    transform: scale(1.08);
}

.poster-shade,
.mini-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.06) 62%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade,
.mini-card:hover .mini-card-shade {
    opacity: 1;
}

.year-badge,
.hot-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    top: 10px;
    left: 10px;
    min-height: 26px;
    padding: 0 9px;
    background: rgba(0, 0, 0, 0.62);
}

.hot-badge {
    top: 10px;
    right: 10px;
    min-height: 26px;
    padding: 0 9px;
    background: #dc2626;
}

.play-badge,
.mini-play {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    background: #f97316;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-line {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-line {
    opacity: 1;
}

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

.movie-card-body h3 {
    min-height: 48px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.45;
}

.movie-card-body h3 a:hover {
    color: #ea580c;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
    margin-top: 10px;
}

.tag-list span {
    border-radius: 999px;
    color: #ea580c;
    background: #fff7ed;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
}

.soft-panel {
    width: min(1280px, calc(100% - 32px));
    margin-top: 56px;
    border-radius: 34px;
    padding: 30px;
    background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

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

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

.movie-card-compact .movie-card-body h3 {
    min-height: 44px;
    font-size: 15px;
}

.rank-panel {
    position: sticky;
    top: 92px;
    border-radius: 24px;
    padding: 22px;
}

.compact-heading h2 {
    font-size: 25px;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 42px 72px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    border-radius: 18px;
    background: #ffffff;
    padding: 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-row.compact {
    grid-template-columns: 34px 54px minmax(0, 1fr) 28px;
    min-height: 72px;
    padding: 8px;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    font-weight: 900;
}

.ranking-row img {
    border-radius: 14px;
    aspect-ratio: 3 / 4;
}

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

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

.rank-info small {
    color: var(--muted);
}

.rank-play {
    color: #ea580c;
    font-weight: 900;
}

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

.mini-card {
    position: relative;
    min-height: 220px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111827;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.mini-card img {
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.mini-card strong,
.mini-card small {
    position: absolute;
    left: 14px;
    right: 14px;
    z-index: 2;
    color: #ffffff;
}

.mini-card strong {
    bottom: 36px;
}

.mini-card small {
    bottom: 14px;
    color: #e5e7eb;
}

.mini-play {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, currentColor, #111827);
    padding: 80px 0;
}

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

.page-hero span {
    display: inline-flex;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    padding: 6px 12px;
    font-weight: 800;
}

.page-hero h1 {
    max-width: 900px;
    margin: 18px 0 14px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 62px);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

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

.category-detail-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
    border-radius: 28px;
    padding: 20px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.category-samples a {
    border-radius: 999px;
    color: var(--muted);
    background: #f3f4f6;
    padding: 5px 9px;
    font-size: 13px;
    font-weight: 650;
}

.category-enter {
    min-height: 40px;
    padding: 0 18px;
}

.filter-panel,
.rank-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    align-items: end;
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 24px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

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

.empty-state {
    display: none;
    color: var(--muted);
    text-align: center;
    padding: 50px 0;
    font-weight: 800;
}

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

.rank-search-panel {
    grid-template-columns: minmax(0, 1fr) auto;
}

.rank-search-panel a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: #ea580c;
    padding: 13px 18px;
    font-weight: 800;
}

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

.search-hero {
    color: #ea580c;
}

.search-page-form {
    margin-bottom: 24px;
}

.detail-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 60px;
}

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

.breadcrumb a {
    color: #ea580c;
    font-weight: 750;
}

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

.player-card,
.detail-card,
.sticky-panel {
    border-radius: 24px;
    overflow: hidden;
}

.player-card {
    background: #000000;
    margin-bottom: 22px;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
    z-index: 4;
}

.play-layer span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 24px 45px rgba(220, 38, 38, 0.35);
    font-size: 32px;
    padding-left: 5px;
}

.play-layer.is-hidden {
    display: none;
}

.detail-card {
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-tags-top {
    margin-bottom: 18px;
}

.detail-tags-top span,
.detail-tags-top a,
.detail-genre-list span,
.detail-tag-list span {
    color: #ea580c;
    background: #fff7ed;
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0 0 20px;
    color: #4b5563;
    font-size: 20px;
    font-weight: 700;
}

.detail-genre-list {
    margin-bottom: 28px;
}

.detail-card section {
    border-top: 1px solid var(--line);
    padding-top: 22px;
    margin-top: 22px;
}

.detail-card h2,
.sticky-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.sticky-panel {
    position: sticky;
    top: 94px;
    padding: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-poster {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
}

.detail-poster img {
    aspect-ratio: 3 / 4;
}

.side-meta {
    display: grid;
    gap: 8px;
    margin: 16px 0 22px;
}

.side-meta strong {
    font-size: 20px;
}

.side-meta span {
    color: var(--muted);
}

.side-meta a {
    color: #ea580c;
    font-weight: 800;
}

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

.related-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 92px;
    border-radius: 16px;
    background: #f9fafb;
    overflow: hidden;
    padding: 8px;
}

.related-card img {
    border-radius: 12px;
    aspect-ratio: 3 / 4;
}

.related-card strong,
.related-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-card strong {
    line-height: 1.35;
}

.related-card small {
    color: var(--muted);
    margin-top: 5px;
    white-space: nowrap;
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #030712);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.1fr;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 14px;
    font-size: 20px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

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

.site-footer a:hover {
    color: #fb923c;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #1f2937;
    margin-top: 32px;
    padding-top: 22px;
    color: #9ca3af;
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: var(--shadow);
    z-index: 70;
}

.back-to-top.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1180px) {
    .movie-grid,
    .mini-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .sticky-panel {
        position: static;
    }

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

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

    .nav-toggle {
        display: block;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 20px;
        align-content: end;
        padding-bottom: 86px;
    }

    .hero-poster {
        display: none;
    }

    .hero-copy {
        padding-top: 0;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .quick-search-panel form,
    .search-page-form {
        flex-direction: column;
    }

    .category-detail-grid,
    .full-ranking,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-detail-card {
        grid-template-columns: 160px minmax(0, 1fr);
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .header-inner {
        min-height: 64px;
    }

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

    .hero-slider {
        height: 520px;
    }

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

    .content-section {
        padding-top: 42px;
    }

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

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

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

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

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

    .movie-card-body h3 {
        min-height: 44px;
        font-size: 15px;
    }

    .poster-line {
        display: none;
    }

    .page-hero {
        padding: 58px 0;
    }

    .detail-card {
        padding: 20px;
    }

    .play-layer span {
        width: 74px;
        height: 74px;
        font-size: 26px;
    }

    .ranking-row {
        grid-template-columns: 36px 58px minmax(0, 1fr) 24px;
        gap: 8px;
    }
}


.category-tile,
.category-detail-card,
.page-hero {
    --accent: #ea580c;
}

.accent-orange,
.orange-hero {
    --accent: #ea580c;
}

.accent-red,
.red-hero {
    --accent: #dc2626;
}

.accent-blue {
    --accent: #2563eb;
}

.accent-pink {
    --accent: #db2777;
}

.accent-purple {
    --accent: #7c3aed;
}

.accent-cyan {
    --accent: #0891b2;
}

.accent-green {
    --accent: #16a34a;
}

.accent-gold {
    --accent: #ca8a04;
}

.category-tile,
.category-detail-card {
    color: var(--accent);
}

.category-tile::after {
    background: var(--accent);
}

.category-tile span,
.category-detail-body span {
    color: #ffffff;
    background: var(--accent);
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #111827);
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}
