:root {
    color-scheme: light;
    --page-bg: #fff7ed;
    --soft-bg: #fffaf4;
    --card-bg: rgba(255, 255, 255, 0.92);
    --ink: #221315;
    --muted: #735f5a;
    --line: rgba(127, 29, 29, 0.14);
    --red-950: #450a0a;
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --amber-900: #78350f;
    --amber-700: #b45309;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --shadow: 0 24px 60px rgba(127, 29, 29, 0.14);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        linear-gradient(180deg, #fff7ed 0%, #fff1f2 48%, #fff7ed 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 237, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 74px;
    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: 900;
    letter-spacing: 0.02em;
    color: var(--red-900);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--red-900), var(--amber-700));
    box-shadow: 0 12px 28px rgba(153, 27, 27, 0.28);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #5f3127;
    font-weight: 700;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--red-900), var(--amber-700));
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(127, 29, 29, 0.09);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--red-900);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

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

main {
    min-height: 72vh;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--red-950), var(--amber-900));
}

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

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-backdrop {
    background-size: cover;
    background-position: center;
    filter: saturate(1.06);
}

.hero-backdrop::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 52px 52px;
    opacity: 0.22;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 48px;
    padding: 72px 0;
}

.hero-copy {
    color: #fff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--amber-100);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-kicker {
    color: var(--red-800);
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 7vw, 68px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-intro p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 247, 237, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(8px);
}

.tag-list span {
    color: var(--amber-900);
    background: #fef3c7;
}

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

.primary-button,
.ghost-button,
.section-action,
.full-link,
.category-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-button,
.section-action,
.full-link,
.category-button {
    color: #fff;
    background: linear-gradient(135deg, var(--red-800), var(--amber-700));
    box-shadow: 0 16px 30px rgba(153, 27, 27, 0.24);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.13);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover,
.full-link:hover,
.category-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    aspect-ratio: 3 / 4;
}

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

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

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

.hero-dot.active {
    width: 30px;
    background: #fff;
}

.quick-search-section,
.content-section {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
}

.quick-search-card,
.page-hero,
.category-hero,
.ranking-hero,
.search-hero {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.quick-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
    align-items: center;
    gap: 26px;
    padding: 30px;
}

.quick-search-card h2,
.section-heading h2,
.panel-heading h2,
.side-panel h2,
.detail-text h2 {
    margin: 0 0 10px;
    color: var(--red-950);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.quick-search-card p,
.section-heading p,
.detail-text p,
.category-overview-card p,
.category-tile small,
.movie-card p,
.ranking-info p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.home-search,
.filter-bar {
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-bar input {
    min-width: 0;
    width: 100%;
    height: 52px;
    border: 1px solid rgba(127, 29, 29, 0.16);
    border-radius: 999px;
    padding: 0 18px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.home-search input:focus,
.filter-bar input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.home-search button,
.filter-buttons button {
    height: 52px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red-900), var(--amber-700));
    cursor: pointer;
}

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

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

.category-tile,
.category-overview-card a {
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 210px;
    border-radius: var(--radius-lg);
    background: var(--red-950);
    box-shadow: var(--shadow);
}

.category-tile img,
.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    transition: 0.35s ease;
}

.category-tile:hover img,
.category-overview-card:hover img {
    transform: scale(1.08);
    opacity: 0.6;
}

.category-tile span,
.category-tile small,
.category-overview-card div {
    position: relative;
    z-index: 1;
}

.category-tile {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: #fff;
}

.category-tile span {
    font-size: 24px;
    font-weight: 950;
}

.category-tile small {
    margin-top: 8px;
    color: rgba(255, 247, 237, 0.82);
}

.category-overview-card a {
    min-height: 260px;
}

.category-overview-card div {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 26px;
    color: #fff;
    background: linear-gradient(180deg, transparent 10%, rgba(69, 10, 10, 0.82));
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-overview-card p {
    color: rgba(255, 247, 237, 0.86);
}

.category-button {
    align-self: flex-start;
    margin-top: 14px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(127, 29, 29, 0.12);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: 0 12px 30px rgba(127, 29, 29, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(127, 29, 29, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--red-900), var(--amber-700));
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.35s ease;
}

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

.poster-badge,
.poster-region {
    position: absolute;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 12px;
}

.poster-region {
    right: 12px;
}

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

.movie-card h3 {
    min-height: 48px;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover {
    color: var(--red-800);
}

.movie-card p {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: #8a4b1d;
    font-size: 13px;
    font-weight: 800;
}

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

.ranking-panel,
.side-panel {
    position: sticky;
    top: 96px;
    border: 1px solid rgba(127, 29, 29, 0.12);
    border-radius: var(--radius-xl);
    padding: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 32px 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(254, 243, 199, 0.42);
}

.rank-row:hover {
    background: rgba(254, 243, 199, 0.78);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #fff;
    font-weight: 950;
    background: var(--red-800);
}

.rank-row img {
    width: 48px;
    height: 62px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    grid-column: 3 / 4;
    color: var(--muted);
    font-size: 12px;
}

.full-link {
    width: 100%;
    margin-top: 18px;
}

.page-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
    padding: clamp(42px, 7vw, 84px);
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.38), transparent 28rem),
        linear-gradient(135deg, var(--red-950), var(--amber-900));
}

.page-hero p {
    margin-bottom: 0;
}

.filter-bar {
    position: relative;
    z-index: 4;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgba(127, 29, 29, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 36px rgba(127, 29, 29, 0.09);
}

.sticky-filter {
    position: sticky;
    top: 88px;
}

.filter-buttons,
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-buttons button {
    height: 42px;
    padding: 0 14px;
    color: var(--red-900);
    background: rgba(127, 29, 29, 0.08);
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--red-900), var(--amber-700));
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
}

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

.ranking-number {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--red-900), var(--amber-500));
}

.ranking-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ranking-info h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    color: #fff;
    background: var(--red-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.detail-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 520px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: 38px;
    padding: 54px 0;
}

.detail-cover {
    width: 100%;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 28px 78px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 247, 237, 0.76);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #fff;
}

.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: -54px auto 34px;
    position: relative;
    z-index: 6;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-xl);
    background: #050505;
    box-shadow: 0 30px 90px rgba(69, 10, 10, 0.28);
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #050505;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.46));
    cursor: pointer;
}

.play-trigger span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    padding-left: 5px;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--red-800), var(--amber-500));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.player-shell.is-active .play-trigger {
    opacity: 0;
    pointer-events: none;
}

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

.detail-main {
    display: grid;
    gap: 18px;
}

.detail-text,
.side-panel {
    border: 1px solid rgba(127, 29, 29, 0.12);
    border-radius: var(--radius-xl);
    padding: 26px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.detail-text p {
    margin: 0;
    font-size: 17px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(254, 243, 199, 0.38);
    font-weight: 900;
}

.compact-card:hover {
    background: rgba(254, 243, 199, 0.78);
}

.compact-card img {
    width: 58px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

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

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: rgba(255, 247, 237, 0.9);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-shell strong {
    color: var(--red-900);
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.footer-links a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--red-900);
    font-weight: 900;
    background: rgba(127, 29, 29, 0.08);
}

.hidden-by-filter {
    display: none !important;
}

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

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

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

    .ranking-panel,
    .side-panel {
        position: static;
    }
}

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

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

    .hero-content,
    .detail-shell,
    .quick-search-card {
        grid-template-columns: 1fr;
    }

    .hero-carousel,
    .hero-content {
        min-height: 760px;
    }

    .hero-poster {
        width: min(280px, 78vw);
    }

    .detail-cover {
        width: min(260px, 78vw);
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

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

    .ranking-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .quick-search-section,
    .content-section,
    .page-hero,
    .detail-shell,
    .player-section,
    .footer-shell {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 36px;
    }

    .movie-grid,
    .home-grid,
    .wide-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .footer-shell {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-search {
        flex-direction: column;
    }

    .ranking-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
