:root {
    --sand-50: #faf8f3;
    --sand-100: #f4eadb;
    --sand-200: #e4d2b5;
    --earth-900: #4d4238;
    --earth-800: #5f5043;
    --earth-700: #735f50;
    --earth-600: #8a7360;
    --desert-700: #b93d0d;
    --desert-600: #de520d;
    --desert-500: #ef6c1c;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --red-500: #ef4444;
    --gray-950: #0f172a;
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 20px 40px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--gray-900);
    background: var(--sand-50);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-600), var(--desert-500));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
    font-size: 13px;
    padding-left: 2px;
}

.brand-text {
    font-size: 22px;
    color: var(--gray-900);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--gray-700);
    font-weight: 650;
}

.nav-link {
    position: relative;
    padding: 20px 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    height: 2px;
    border-radius: 999px;
    background: var(--red-600);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.mobile-menu-button {
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--gray-700);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

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

.mobile-link.is-active,
.mobile-link:hover {
    color: var(--red-600);
    background: #fee2e2;
}

.home-hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: var(--gray-900);
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 25%, rgba(220, 38, 38, 0.42), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-content > * {
    max-width: 680px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--white);
    background: var(--red-600);
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.32);
}

.hero-content h1 {
    margin: 18px 0 16px;
    color: var(--white);
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.07em;
    font-weight: 900;
}

.hero-content p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    max-width: 620px;
}

.hero-meta {
    color: #f3f4f6;
    font-size: 15px;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.secondary-button,
.light-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--red-600);
    box-shadow: 0 18px 30px rgba(220, 38, 38, 0.32);
}

.primary-button:hover,
.light-button:hover {
    transform: translateY(-2px);
    background: var(--red-700);
}

.secondary-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(10px);
}

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

.light-button {
    color: var(--white);
    background: var(--gray-900);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 42px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

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

.category-strip {
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.category-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    color: var(--gray-700);
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.category-pill:hover {
    color: var(--red-600);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.category-pill span:last-child {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--red-600);
}

.section-block {
    padding: 56px 0 0;
}

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

.section-head h2,
.search-panel h2,
.page-title h1,
.detail-copy h1 {
    margin: 8px 0 0;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.section-head p,
.page-title p,
.category-tile p,
.detail-copy p {
    color: var(--gray-600);
}

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--earth-900);
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(220, 38, 38, 0.92);
    font-size: 12px;
    font-weight: 750;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 3px;
    border-radius: 50%;
    color: var(--red-600);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    color: var(--gray-500);
    font-size: 13px;
}

.card-title {
    margin: 9px 0 8px;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

.card-title a:hover {
    color: var(--red-600);
}

.card-desc {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--earth-700);
    background: var(--sand-100);
    font-size: 12px;
    font-weight: 700;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 64px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-card);
}

.rank-number {
    color: var(--red-600);
    font-size: 22px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.rank-item img {
    width: 64px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--earth-900);
}

.rank-copy {
    display: grid;
    gap: 4px;
}

.rank-copy strong {
    color: var(--gray-900);
    font-size: 16px;
}

.rank-copy em {
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

.page-title {
    padding: 46px 0 22px;
}

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

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 24px;
    border-radius: 24px;
    color: var(--gray-900);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -54px;
    top: -42px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.28), transparent 68%);
}

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

.category-tile h2 {
    margin: 0 0 8px;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.category-tile strong {
    color: var(--red-600);
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 26px 0 30px;
    padding: 24px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.search-panel .section-kicker {
    color: var(--red-600);
    background: #fee2e2;
    box-shadow: none;
}

.search-panel h2 {
    font-size: clamp(22px, 3vw, 32px);
}

.search-box {
    width: min(460px, 100%);
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid var(--sand-200);
    border-radius: 18px;
    background: var(--sand-50);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    color: var(--gray-900);
    background: transparent;
}

.no-results {
    display: none;
    padding: 24px;
    border-radius: 18px;
    color: var(--gray-600);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.no-results.is-visible {
    display: block;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-card);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: #000000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.58));
}

.big-play {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 50%;
    color: var(--red-600);
    background: rgba(255, 255, 255, 0.92);
    font-size: 34px;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-cover:hover .big-play {
    transform: scale(1.08);
    background: var(--white);
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.player-shell:hover .player-controls,
.player-shell.is-playing .player-controls,
.player-shell:focus-within .player-controls {
    opacity: 1;
    pointer-events: auto;
}

.player-controls button {
    min-width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.player-controls button:hover {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 0.3);
}

.detail-copy,
.side-card {
    margin-top: 24px;
    padding: 24px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-copy h1 {
    font-size: clamp(30px, 4.5vw, 46px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
    color: var(--gray-600);
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--gray-100);
}

.detail-section {
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.detail-section + .detail-section {
    margin-top: 24px;
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 12px;
    color: var(--gray-900);
    font-size: 22px;
    line-height: 1.3;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.85;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-poster {
    overflow: hidden;
    border-radius: 20px;
    background: var(--earth-900);
    box-shadow: var(--shadow-soft);
}

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

.side-card {
    margin-top: 18px;
}

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

.related-link {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: var(--sand-50);
    transition: transform 0.2s ease, background 0.2s ease;
}

.related-link:hover {
    transform: translateX(3px);
    background: #fee2e2;
}

.related-link img {
    width: 64px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--earth-900);
}

.related-link strong {
    display: block;
    color: var(--gray-900);
    line-height: 1.35;
}

.related-link span {
    color: var(--gray-500);
    font-size: 13px;
}

.site-footer {
    margin-top: 72px;
    color: #f3f4f6;
    background: var(--gray-900);
}

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

.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 32px;
}

.footer-logo .brand-text {
    color: var(--white);
}

.footer-brand p {
    max-width: 520px;
    color: var(--gray-300);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #f87171;
    font-size: 18px;
}

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

.site-footer a {
    color: var(--gray-300);
}

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

.footer-bottom {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

.hidden-card {
    display: none;
}

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

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

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

    .sidebar-poster {
        max-width: 320px;
    }
}

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

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

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

    .home-hero {
        min-height: 620px;
        height: 78vh;
    }

    .hero-content {
        padding-top: 46px;
        justify-content: flex-end;
        padding-bottom: 86px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-arrow {
        top: auto;
        bottom: 24px;
        width: 42px;
        height: 42px;
        font-size: 32px;
    }

    .hero-prev {
        left: 20px;
    }

    .hero-next {
        right: 20px;
    }

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

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

    .section-head,
    .search-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .rank-item {
        grid-template-columns: 38px 54px 1fr;
    }

    .rank-item img,
    .related-link img {
        width: 54px;
        height: 76px;
    }

    .related-link {
        grid-template-columns: 54px 1fr;
    }

    .detail-copy,
    .side-card {
        padding: 18px;
    }

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

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .header-inner,
    .page-main,
    .detail-page,
    .footer-inner,
    .mobile-nav {
        width: min(100% - 24px, 1180px);
    }

    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .hero-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .secondary-button,
    .light-button {
        width: 100%;
    }
}
