:root {
    --green-50: #ecfdf5;
    --green-100: #d1fae5;
    --green-500: #10b981;
    --green-600: #059669;
    --green-700: #047857;
    --teal-600: #0d9488;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: var(--slate-50);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72));
    backdrop-filter: blur(16px);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 178px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    font-weight: 800;
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    box-shadow: 0 12px 25px rgba(5, 150, 105, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: -0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--slate-500);
    font-size: 12px;
}

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

.nav-link {
    color: var(--slate-700);
    font-weight: 650;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--green-600);
    border-color: var(--green-600);
}

.top-search {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.top-search input,
.mobile-search input,
.search-large input,
.filter-panel input,
.filter-panel select {
    border: 0;
    outline: 0;
    min-width: 0;
    background: transparent;
    color: var(--slate-900);
}

.top-search input {
    width: 210px;
    padding: 9px 12px;
}

.top-search button,
.mobile-search button,
.search-large button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: var(--white);
    background: var(--green-600);
    padding: 9px 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-large button:hover {
    background: var(--green-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--slate-100);
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 2px;
    background: var(--slate-800);
}

.mobile-panel {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--slate-200);
    box-shadow: var(--shadow-card);
}

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

.mobile-panel nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 6px;
    padding: 10px 0 20px;
}

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 650;
    color: var(--slate-700);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--green-700);
    background: var(--green-50);
}

.mobile-search {
    width: min(1180px, calc(100% - 32px));
    margin: 14px auto 0;
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: var(--slate-100);
}

.mobile-search input {
    flex: 1;
    padding: 10px 12px;
}

.page-main {
    padding-top: 76px;
    min-height: 70vh;
}

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--green-700));
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: brightness(0.45) saturate(1.12);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 28%, rgba(16, 185, 129, 0.32), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 40%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

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

.hero-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.95);
    color: var(--white);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.hero h1 {
    margin: 22px 0 16px;
    font-size: clamp(38px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

.hero-meta,
.meta-row,
.tag-row,
.hero-actions,
.page-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.meta-row span {
    color: inherit;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.46);
    padding: 7px 12px;
    font-size: 14px;
}

.meta-row span {
    background: var(--slate-100);
    color: var(--slate-600);
}

.meta-row.big span {
    font-size: 15px;
    padding: 8px 14px;
}

.hero-actions {
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-link,
.small-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--green-600);
    padding: 13px 26px;
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.28);
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--green-700);
}

.primary-button.block {
    display: flex;
    width: 100%;
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.42);
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

.ghost-button.light {
    color: var(--white);
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 36px;
    background: var(--white);
}

.quick-panel {
    position: relative;
    z-index: 3;
    margin-top: -42px;
    padding: 0 16px;
}

.quick-grid {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.quick-grid a {
    min-height: 112px;
    padding: 24px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.85);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-grid a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.quick-grid strong {
    display: block;
    color: var(--slate-900);
    font-size: 20px;
    margin-bottom: 8px;
}

.quick-grid span {
    color: var(--slate-500);
}

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

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

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

.section-more,
.text-link {
    color: var(--green-700);
}

.section-more:hover,
.text-link:hover {
    color: var(--green-600);
    transform: translateX(3px);
}

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

.movie-card,
.horizontal-card,
.detail-panel,
.side-card,
.filter-panel,
.category-overview-card,
.ranking-row {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-soft);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-900);
}

.poster-link img,
.horizontal-poster img,
.ranking-poster img,
.poster-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img,
.horizontal-poster img {
    transition: transform 0.45s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.55), transparent 56%);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(16, 185, 129, 0.95);
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

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

.duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.72);
    padding: 5px 8px;
    font-size: 12px;
}

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

.category-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    color: var(--green-700);
    background: var(--green-100);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}

.movie-card h3,
.horizontal-card h3,
.ranking-info h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.45;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.ranking-info h2 a:hover {
    color: var(--green-600);
}

.movie-card p,
.horizontal-card p,
.ranking-info p,
.detail-panel p,
.page-hero p,
.category-overview-card p {
    margin: 0;
    color: var(--slate-600);
    line-height: 1.75;
}

.movie-card .meta-row {
    margin-top: 16px;
}

.dark-section {
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.inner-dark {
    color: var(--white);
}

.inner-dark .section-more {
    color: #a7f3d0;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 42px 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
    background: rgba(255, 255, 255, 0.11);
    transform: translateY(-3px);
}

.rank-card img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--slate-900);
    background: #facc15;
    font-weight: 900;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    line-height: 1.45;
}

.rank-info em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.62);
    font-style: normal;
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius-md);
    color: var(--white);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
    box-shadow: var(--shadow-card);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.92;
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) brightness(0.6);
    transition: transform 0.45s ease;
}

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

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

.category-tile small {
    display: block;
    margin: 10px 0 18px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.category-tile b {
    font-size: 14px;
}

.from-red::before { background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(249, 115, 22, 0.68)); }
.from-blue::before { background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(6, 182, 212, 0.68)); }
.from-green::before { background: linear-gradient(135deg, rgba(5, 150, 105, 0.9), rgba(16, 185, 129, 0.68)); }
.from-purple::before { background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(236, 72, 153, 0.68)); }
.from-amber::before { background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.68)); }
.from-indigo::before { background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(37, 99, 235, 0.68)); }
.from-teal::before { background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(20, 184, 166, 0.68)); }
.from-pink::before { background: linear-gradient(135deg, rgba(219, 39, 119, 0.9), rgba(244, 63, 94, 0.68)); }
.from-cyan::before { background: linear-gradient(135deg, rgba(8, 145, 178, 0.9), rgba(14, 165, 233, 0.68)); }
.from-slate::before { background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(51, 65, 85, 0.68)); }

.soft-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(180deg, var(--white), var(--green-50));
}

.cta-section {
    margin: 0 auto 80px;
    width: min(980px, calc(100% - 32px));
    text-align: center;
    border-radius: 32px;
    color: var(--white);
    background: linear-gradient(135deg, var(--green-700), var(--teal-600));
    padding: 52px 30px;
    box-shadow: var(--shadow-soft);
}

.cta-section h2 {
    margin: 0 0 16px;
    font-size: clamp(28px, 5vw, 46px);
}

.cta-section p {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
}

.centered {
    justify-content: center;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 34px;
    color: var(--white);
    background:
        radial-gradient(circle at 16% 20%, rgba(16, 185, 129, 0.38), transparent 30%),
        linear-gradient(135deg, var(--slate-900), var(--green-700));
    padding: 46px;
    box-shadow: var(--shadow-soft);
}

.page-hero.slim {
    min-height: 220px;
}

.page-hero span {
    color: #a7f3d0;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 13px;
}

.page-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(34px, 6vw, 56px);
    letter-spacing: -0.04em;
}

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

.page-hero-actions {
    margin-top: 26px;
}

.page-hero-actions a {
    border-radius: 999px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    font-weight: 750;
}

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

.category-overview-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
}

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

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

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

.category-overview-card .text-link {
    margin-top: 18px;
}

.listing-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 80px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.filter-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    display: grid;
    gap: 18px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--slate-700);
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--slate-50);
}

.listing-content {
    min-width: 0;
}

.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.listing-toolbar h2 {
    margin: 0;
    font-size: 28px;
}

.view-switch {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--slate-100);
}

.view-switch button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 14px;
    background: transparent;
    color: var(--slate-600);
    font-weight: 800;
}

.view-switch button.active {
    color: var(--white);
    background: var(--green-600);
}

.listing-content.list-view .movie-grid {
    grid-template-columns: 1fr;
}

.listing-content.list-view .movie-card {
    display: grid;
    grid-template-columns: 260px 1fr;
}

.listing-content.list-view .poster-link {
    aspect-ratio: auto;
    height: 100%;
    min-height: 180px;
}

.horizontal-list {
    display: grid;
    gap: 18px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.horizontal-poster {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    background: var(--slate-900);
}

.horizontal-body {
    padding: 24px;
}

.tag-row {
    margin-top: 14px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    padding: 6px 10px;
    font-size: 13px;
}

.search-large {
    display: flex;
    width: min(720px, 100%);
    gap: 10px;
    margin-top: 28px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.search-large input {
    flex: 1;
    color: var(--white);
    padding: 12px 16px;
}

.search-large input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 118px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.ranking-rank {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--slate-900);
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    font-weight: 950;
}

.ranking-poster {
    display: block;
    width: 118px;
    height: 82px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--slate-900);
}

.ranking-info h2 {
    font-size: 20px;
}

.small-play {
    color: var(--white);
    background: var(--green-600);
    padding: 10px 16px;
}

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

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

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

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

.detail-main {
    min-width: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow-soft);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.22));
    font-size: 18px;
    font-weight: 900;
}

.player-overlay.hidden {
    display: none;
}

.player-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--green-600);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.detail-panel {
    margin-top: 22px;
    padding: 26px;
}

.detail-panel h1,
.detail-panel h2 {
    margin: 0 0 16px;
    letter-spacing: -0.03em;
}

.detail-panel h1 {
    font-size: clamp(28px, 5vw, 42px);
}

.detail-panel h2 {
    font-size: 26px;
}

.lead {
    margin-top: 18px !important;
    font-size: 18px;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 20px;
}

.side-card {
    padding: 22px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 18px;
}

.info-list {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.info-list dt {
    color: var(--slate-500);
}

.info-list dd {
    margin: 0;
    color: var(--slate-900);
    font-weight: 750;
}

.related-section {
    padding-top: 50px;
}

.site-footer {
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
    margin-top: 80px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.footer-brand {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.footer-brand strong {
    display: block;
    color: var(--white);
    font-size: 22px;
    margin-bottom: 8px;
}

.footer-brand p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.7;
}

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

.footer-links a:hover {
    color: #a7f3d0;
}

.copyright {
    grid-column: 1 / -1;
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 14px;
}

.hidden-card {
    display: none !important;
}

@media (max-width: 1080px) {
    .top-search {
        display: none;
    }

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

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

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

    .filter-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        height: 68px;
    }

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

    .brand-text small {
        display: none;
    }

    .hero {
        height: 560px;
    }

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

    .category-overview-card,
    .horizontal-card,
    .ranking-row,
    .listing-content.list-view .movie-card {
        grid-template-columns: 1fr;
    }

    .horizontal-poster,
    .ranking-poster {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

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

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

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

@media (max-width: 580px) {
    .header-inner {
        width: calc(100% - 24px);
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text strong {
        font-size: 19px;
    }

    .hero {
        height: 590px;
    }

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

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

    .hero-actions,
    .page-hero-actions,
    .search-large {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-grid,
    .movie-grid,
    .rank-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .section-head,
    .listing-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .ranking-row {
        gap: 12px;
    }

    .small-play {
        width: 100%;
    }

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