@import url("https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap");

:root {
    --blackboard: #1a2e1a;
    --blackboard-dark: #0f1a0f;
    --blackboard-light: #2d4a2d;
    --chalk-white: #f8f8f2;
    --chalk-yellow: #fffacd;
    --chalk-blue: #add8e6;
    --chalk-green: #90ee90;
    --chalk-pink: #ffb6c1;
    --vintage-gold: #ffd700;
    --vintage-beige: #d4c5aa;
    --line-soft: rgba(255, 250, 205, 0.28);
    --shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.38);
    --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--chalk-white);
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 215, 0, 0.08), transparent 32rem),
        radial-gradient(circle at 80% 20%, rgba(173, 216, 230, 0.08), transparent 28rem),
        var(--blackboard);
    font-family: "Patrick Hand", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.22;
    z-index: -1;
}

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

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: 50;
    background: rgba(26, 46, 26, 0.94);
    border-bottom: 2px solid var(--line-soft);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--chalk-white);
    font-size: clamp(1.55rem, 4vw, 2.3rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    box-shadow: inset 0 -3px rgba(0, 0, 0, 0.12), 0 0 20px rgba(255, 250, 205, 0.22);
}

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

.desktop-nav a,
.mobile-nav-panel a {
    color: rgba(248, 248, 242, 0.88);
    font-size: 1.1rem;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav-panel a:hover,
.mobile-nav-panel a.active {
    color: var(--chalk-yellow);
}

.header-search,
.mobile-search,
.large-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.large-search input,
.inline-filter input {
    width: 220px;
    color: var(--chalk-white);
    background: rgba(45, 74, 45, 0.92);
    border: 1px solid rgba(255, 250, 205, 0.35);
    border-radius: 12px;
    outline: none;
    padding: 10px 14px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.large-search input {
    width: min(520px, 100%);
    padding: 14px 18px;
    font-size: 1.1rem;
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.inline-filter input:focus {
    border-color: var(--chalk-yellow);
    box-shadow: 0 0 0 3px rgba(255, 250, 205, 0.12);
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-button,
.ghost-button {
    cursor: pointer;
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-button {
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    box-shadow: 0 10px 22px rgba(255, 250, 205, 0.12);
}

.ghost-button {
    color: var(--chalk-white);
    background: rgba(45, 74, 45, 0.76);
    border: 1px solid rgba(255, 250, 205, 0.35);
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    background: var(--chalk-white);
}

.mobile-menu-button {
    display: none;
    color: var(--chalk-white);
    background: transparent;
    border: 0;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-panel {
    display: none;
    border-top: 1px solid var(--line-soft);
    padding: 16px;
    background: var(--blackboard);
}

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

.mobile-nav-panel nav {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.hero-carousel {
    position: relative;
    min-height: clamp(520px, 72vh, 740px);
    overflow: hidden;
    border-bottom: 2px solid rgba(255, 250, 205, 0.22);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: saturate(1.05) contrast(1.04);
}

.hero-overlay,
.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(26, 46, 26, 1), rgba(26, 46, 26, 0.72), rgba(15, 26, 15, 0.28)),
        linear-gradient(90deg, rgba(15, 26, 15, 0.78), rgba(15, 26, 15, 0.2));
}

.hero-content {
    position: absolute;
    inset: auto 0 0;
    padding-bottom: clamp(60px, 10vh, 110px);
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border-radius: 999px;
    padding: 7px 16px;
    font-weight: 900;
    margin-bottom: 18px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    color: var(--chalk-white);
    font-size: clamp(2.8rem, 8vw, 6.4rem);
    line-height: 0.95;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.hero-copy p {
    max-width: 650px;
    margin: 0 0 22px;
    color: rgba(248, 248, 242, 0.92);
    font-size: clamp(1.1rem, 2.4vw, 1.45rem);
    line-height: 1.7;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    color: var(--chalk-white);
    background: rgba(45, 74, 45, 0.72);
    border: 1px solid rgba(255, 250, 205, 0.32);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.96rem;
}

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

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

.hero-dots button {
    width: 38px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 248, 242, 0.36);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--chalk-yellow);
}

.page-stack {
    display: grid;
    gap: 64px;
    padding: 64px 0;
}

.top-gap {
    padding-top: 44px;
}

.chalk-panel,
.category-overview-card {
    background: rgba(45, 74, 45, 0.88);
    border: 2px solid rgba(255, 250, 205, 0.24);
    border-radius: 24px;
    padding: clamp(22px, 4vw, 36px);
    box-shadow: var(--shadow-soft);
}

.gradient-panel {
    background: linear-gradient(135deg, rgba(45, 74, 45, 0.94), rgba(15, 26, 15, 0.92));
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
}

.search-panel h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 5vw, 3rem);
}

.search-panel p {
    margin: 0;
    color: rgba(248, 248, 242, 0.76);
    line-height: 1.7;
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 26px;
}

.section-heading h2,
.category-overview-head h2,
.page-title h1,
.detail-text h2 {
    margin: 0;
    color: var(--chalk-white);
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.08;
}

.section-heading p,
.category-overview-head p,
.page-title p {
    max-width: 720px;
    margin: 10px 0 0;
    color: rgba(248, 248, 242, 0.72);
    line-height: 1.7;
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--chalk-yellow);
    font-size: 1.1rem;
    font-weight: 900;
}

.section-more span {
    font-size: 1.6rem;
}

.accent-yellow h1,
.accent-yellow h2,
.accent-yellow .section-more {
    color: var(--chalk-yellow);
}

.accent-blue h1,
.accent-blue h2,
.accent-blue .section-more {
    color: var(--chalk-blue);
}

.accent-green h1,
.accent-green h2,
.accent-green .section-more {
    color: var(--chalk-green);
}

.accent-pink h1,
.accent-pink h2,
.accent-pink .section-more {
    color: var(--chalk-pink);
}

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

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    color: var(--chalk-white);
    background: rgba(15, 26, 15, 0.52);
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 250, 205, 0.56);
    box-shadow: var(--shadow-strong);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blackboard-light), var(--blackboard-dark));
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(to top, rgba(15, 26, 15, 0.92), transparent);
}

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.type-badge {
    left: 10px;
    bottom: 10px;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    padding: 4px 10px;
    font-size: 0.84rem;
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-pink);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0;
    color: var(--chalk-white);
    font-size: 1.25rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body p {
    margin: 0;
    min-height: 3.4em;
    color: rgba(248, 248, 242, 0.72);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: rgba(255, 250, 205, 0.86);
    font-size: 0.92rem;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 7px;
    color: rgba(248, 248, 242, 0.44);
}

.movie-card.compact .movie-card-body {
    padding: 13px;
}

.movie-card.compact .movie-card-body h3 {
    font-size: 1.05rem;
}

.movie-card.compact .movie-card-body p {
    font-size: 0.95rem;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 22px;
    border: 2px solid rgba(255, 250, 205, 0.2);
    background: var(--blackboard-light);
    box-shadow: var(--shadow-soft);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 0.25s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 26, 15, 0.95), rgba(15, 26, 15, 0.18));
}

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

.category-tile div {
    position: relative;
    z-index: 2;
    padding: 18px;
}

.category-tile span {
    display: block;
    margin-bottom: 8px;
    color: var(--chalk-yellow);
    font-size: 1.55rem;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: rgba(248, 248, 242, 0.76);
    line-height: 1.55;
}

.category-overview-card {
    display: grid;
    gap: 10px;
}

.page-title {
    padding: 34px 0 8px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(248, 248, 242, 0.68);
}

.breadcrumbs a {
    color: var(--chalk-yellow);
}

.inline-filter {
    margin-top: 22px;
}

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

.rank-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row a {
    display: grid;
    grid-template-columns: 60px 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 98px;
    padding: 12px;
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 18px;
    background: rgba(15, 26, 15, 0.44);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
    transform: translateX(5px);
    border-color: rgba(255, 250, 205, 0.52);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-pink);
    border-radius: 999px;
    font-size: 1.35rem;
    font-weight: 900;
}

.rank-row img {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--blackboard-light);
}

.rank-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.rank-main strong {
    font-size: 1.25rem;
}

.rank-main em {
    color: rgba(248, 248, 242, 0.72);
    font-style: normal;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    color: rgba(255, 250, 205, 0.78);
    white-space: nowrap;
}

.search-status {
    margin-bottom: 22px;
    color: rgba(248, 248, 242, 0.76);
    font-size: 1.1rem;
}

.detail-hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding-top: 58px;
    padding-bottom: 58px;
}

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

.detail-poster {
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.34);
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
    background: var(--blackboard-light);
}

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

.detail-copy h1 {
    margin: 0 0 18px;
    color: var(--chalk-white);
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 1;
    text-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}

.detail-copy p {
    max-width: 760px;
    margin: 0 0 18px;
    color: rgba(248, 248, 242, 0.88);
    font-size: 1.25rem;
    line-height: 1.7;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.detail-meta span {
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border-radius: 999px;
    padding: 6px 13px;
    font-weight: 900;
}

.detail-page-stack {
    padding-top: 38px;
}

.player-section {
    scroll-margin-top: 96px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.3);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    color: var(--blackboard-dark);
    background: radial-gradient(circle, rgba(255, 250, 205, 0.22), rgba(15, 26, 15, 0.74));
    border: 0;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 900;
}

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

.play-symbol {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border-radius: 999px;
    font-size: 2.4rem;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.detail-text {
    display: grid;
    gap: 14px;
}

.detail-text h2 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    color: var(--chalk-yellow);
}

.detail-text p {
    margin: 0 0 12px;
    color: rgba(248, 248, 242, 0.84);
    font-size: 1.1rem;
    line-height: 1.9;
}

.site-footer {
    border-top: 2px solid rgba(255, 250, 205, 0.22);
    background: var(--blackboard-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 48px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: var(--chalk-yellow);
}

.site-footer p {
    margin: 0;
    color: rgba(248, 248, 242, 0.72);
    line-height: 1.7;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: rgba(248, 248, 242, 0.78);
}

.site-footer a:hover {
    color: var(--chalk-yellow);
}

.footer-bottom {
    padding: 18px 16px;
    color: rgba(248, 248, 242, 0.62);
    text-align: center;
    border-top: 1px solid rgba(255, 250, 205, 0.16);
}

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

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

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

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

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

    .search-panel,
    .section-heading,
    .category-overview-head,
    .detail-layout {
        grid-template-columns: 1fr;
        display: grid;
        align-items: start;
    }

    .detail-layout {
        gap: 24px;
    }

    .detail-poster {
        width: min(300px, 76vw);
    }

    .rank-row a {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .rank-meta {
        grid-column: 3;
        white-space: normal;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 64px;
    }

    .site-logo {
        font-size: 1.55rem;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 70px;
    }

    .page-stack {
        gap: 42px;
        padding: 42px 0;
    }

    .chalk-panel,
    .category-overview-card {
        border-radius: 18px;
        padding: 20px;
    }

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

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

    .category-tile {
        min-height: 170px;
    }

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

    .movie-card-body h3 {
        font-size: 1.05rem;
    }

    .movie-card-body p {
        font-size: 0.94rem;
    }

    .detail-hero {
        min-height: 720px;
    }

    .detail-hero-content {
        padding-top: 34px;
    }

    .player-shell {
        border-radius: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        padding: 34px 0;
    }
}
