:root {
    --stone-50: #faf9f7;
    --stone-100: #f5f3f0;
    --stone-200: #e5e1da;
    --stone-300: #d3ccc0;
    --stone-500: #8d8172;
    --stone-600: #6f665b;
    --stone-700: #5b534a;
    --stone-800: #4c4740;
    --stone-900: #312d28;
    --earth-50: #faf8f5;
    --earth-100: #f2ede4;
    --earth-300: #d9b98a;
    --earth-500: #b9864f;
    --earth-600: #a47549;
    --earth-700: #875e3a;
    --earth-900: #44301f;
    --canyon-500: #c26a3d;
    --canyon-600: #a95734;
    --canyon-900: #4c2418;
    --moss-50: #f6f7f4;
    --moss-600: #6d7a58;
    --white: #ffffff;
    --shadow-soft: 0 16px 40px rgba(49, 45, 40, 0.10);
    --shadow-hover: 0 22px 60px rgba(49, 45, 40, 0.18);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 249, 247, 0.94);
    border-bottom: 1px solid var(--stone-200);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--stone-800);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: var(--earth-600);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(164, 117, 73, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-links a,
.mobile-panel a {
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--stone-700);
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    background: var(--stone-100);
    color: var(--earth-700);
}

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

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input {
    width: 220px;
    border: 1px solid var(--stone-300);
    border-radius: 14px;
    padding: 10px 14px;
    background: var(--white);
    color: var(--stone-900);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus {
    border-color: var(--earth-600);
    box-shadow: 0 0 0 4px rgba(164, 117, 73, 0.16);
}

.header-search button,
.mobile-search button,
.search-page-form button,
.btn {
    border: 0;
    border-radius: 14px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-page-form button,
.btn-primary {
    background: var(--earth-600);
    color: var(--white);
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.btn-primary:hover {
    background: var(--earth-700);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--stone-100);
    color: var(--stone-700);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--stone-200);
    background: var(--white);
    padding: 14px 16px 18px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 8px;
}

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 620px;
    background: linear-gradient(135deg, var(--earth-900), var(--stone-800) 50%, var(--canyon-900));
    overflow: hidden;
}

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

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.95) contrast(1.05);
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(217, 185, 138, 0.26), transparent 34%),
        linear-gradient(90deg, rgba(49, 45, 40, 0.92), rgba(49, 45, 40, 0.66) 48%, rgba(49, 45, 40, 0.28)),
        linear-gradient(0deg, rgba(49, 45, 40, 0.74), transparent 54%);
}

.hero-content {
    position: relative;
    height: 100%;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 56px;
    color: var(--white);
}

.hero-copy {
    max-width: 730px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--earth-300);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 23px);
}

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

.hero-poster {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) translateY(-4px);
}

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

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

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

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

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

.bg-soft {
    background: var(--stone-100);
}

.bg-gradient-band {
    background: linear-gradient(135deg, var(--stone-100), var(--earth-50));
}

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

.section-header h2 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-header p {
    margin: 0;
    color: var(--stone-600);
}

.section-link {
    flex: none;
    color: var(--earth-700);
    font-weight: 900;
}

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

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

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-link:hover {
    transform: translateY(-5px);
    border-color: rgba(164, 117, 73, 0.38);
    box-shadow: var(--shadow-hover);
}

.card-media {
    position: relative;
    overflow: hidden;
    background: var(--stone-200);
}

.card-media img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.42s ease;
}

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

.year-badge,
.rank-badge,
.play-badge {
    position: absolute;
    border-radius: 999px;
    color: var(--white);
    font-weight: 900;
}

.year-badge {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.62);
    font-size: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: var(--canyon-600);
    font-size: 12px;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.88);
    color: var(--earth-700);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 3.2em;
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.45;
    color: var(--stone-900);
}

.card-body p {
    min-height: 3.2em;
    margin: 0 0 14px;
    color: var(--stone-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--stone-500);
    font-size: 13px;
}

.card-meta span:last-child {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--stone-100);
    color: var(--stone-700);
}

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

.category-tile,
.category-overview-card,
.side-card,
.detail-article,
.filter-panel {
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.category-cover,
.category-overview-media {
    position: relative;
    display: block;
    overflow: hidden;
}

.category-cover img,
.category-overview-media img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-cover:hover img,
.category-overview-media:hover img {
    transform: scale(1.06);
}

.category-cover span,
.category-overview-media span {
    position: absolute;
    inset: auto 16px 16px 16px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.48);
}

.category-cover::after,
.category-overview-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 58%);
}

.category-cover span,
.category-overview-media span {
    z-index: 1;
}

.category-body,
.category-overview-body {
    padding: 18px;
}

.category-body p,
.category-overview-body p {
    margin: 0 0 14px;
    color: var(--stone-600);
}

.mini-links,
.category-preview-links {
    display: grid;
    gap: 8px;
}

.mini-links a,
.category-preview-links a {
    color: var(--earth-700);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 74% 20%, rgba(217, 185, 138, 0.30), transparent 34%),
        linear-gradient(135deg, var(--earth-900), var(--stone-800) 52%, var(--canyon-900));
}

.compact-hero {
    padding: 72px 0 76px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--stone-600);
    font-weight: 700;
}

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

.breadcrumb.light {
    color: rgba(255, 255, 255, 0.70);
}

.breadcrumb.light a {
    color: var(--earth-300);
}

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

.category-overview-body h2 {
    margin: 0 0 8px;
}

.filter-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
}

.filter-panel label {
    color: var(--stone-700);
    font-weight: 900;
}

.filter-panel input {
    width: min(460px, 100%);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--stone-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(0.92);
    transform: scale(1.08);
    opacity: 0.44;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(49, 45, 40, 0.96), rgba(49, 45, 40, 0.70));
}

.detail-hero-inner {
    position: relative;
    min-height: 520px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    padding: 56px 0;
}

.detail-hero-inner .breadcrumb {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-info h1 {
    max-width: 820px;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span,
.tag-list span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    font-weight: 800;
    backdrop-filter: blur(10px);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow-hover);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    padding: 0;
    background: #000000;
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

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

.player-button {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--earth-600);
    color: var(--white);
    font-size: 34px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.detail-article {
    margin-top: 24px;
    padding: 28px;
}

.detail-article h2,
.side-card h2 {
    margin: 0 0 14px;
    color: var(--stone-900);
}

.detail-article p {
    margin: 0 0 24px;
    color: var(--stone-700);
    font-size: 17px;
}

.side-card {
    padding: 24px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0;
}

.side-card dt {
    color: var(--stone-500);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--stone-800);
    font-weight: 700;
}

.side-card a {
    color: var(--earth-700);
}

.search-page-form {
    margin-top: 26px;
    align-items: stretch;
}

.search-page-form input {
    width: min(560px, 100%);
}

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

.site-footer {
    background: var(--stone-900);
    color: rgba(255, 255, 255, 0.72);
    padding: 54px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 14px;
}

.footer-brand p {
    max-width: 520px;
    margin: 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 18px;
}

.site-footer a:not(.site-logo) {
    display: block;
    margin: 6px 0;
    color: rgba(255, 255, 255, 0.72);
}

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

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .site-logo span:last-child {
        max-width: 220px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

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

    .section-header,
    .filter-panel {
        display: grid;
        align-items: start;
    }

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

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

    .detail-poster {
        width: min(260px, 70vw);
    }

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

@media (max-width: 560px) {
    .container,
    .nav-shell {
        width: min(100% - 22px, 1180px);
    }

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

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-actions,
    .search-page-form {
        display: grid;
    }

    .hero-actions .btn,
    .search-page-form button {
        width: 100%;
        text-align: center;
    }

    .compact-hero {
        padding: 52px 0 56px;
    }

    .detail-hero-inner {
        padding: 38px 0;
    }
}
