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

:root {
    --blackboard: #1a2e1a;
    --blackboard-dark: #0f1a0f;
    --blackboard-light: #2d4a2d;
    --chalk-white: #f5f5dc;
    --chalk-yellow: #fffacd;
    --chalk-green: #90ee90;
    --chalk-blue: #add8e6;
    --chalk-pink: #ffb6c1;
    --vintage-gold: #ffd700;
    --vintage-beige: #d4c5aa;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
    --soft-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 0%, rgba(144, 238, 144, 0.10), transparent 32%), var(--blackboard);
    color: var(--chalk-white);
    font-family: "Patrick Hand", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 26, 15, 0.92);
    border-bottom: 2px solid rgba(255, 250, 205, 0.20);
    backdrop-filter: blur(16px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--chalk-yellow);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--blackboard);
    background: var(--chalk-yellow);
    box-shadow: 0 0 28px rgba(255, 250, 205, 0.25);
}

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

.nav-link {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: rgba(245, 245, 220, 0.82);
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--chalk-yellow);
    border-color: rgba(255, 250, 205, 0.30);
    background: rgba(255, 250, 205, 0.08);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 250, 205, 0.30);
    border-radius: 12px;
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
}

.hero {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    background: var(--blackboard-dark);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, var(--blackboard) 0%, rgba(26, 46, 26, 0.78) 45%, rgba(15, 26, 15, 0.38) 100%),
        radial-gradient(circle at 72% 24%, rgba(255, 250, 205, 0.16), transparent 32%);
}

.hero-inner {
    position: relative;
    min-height: 68vh;
    display: flex;
    align-items: flex-end;
    padding: 80px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--chalk-yellow);
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.hero h1,
.page-title-card h1,
.detail-info h1 {
    margin: 0 0 18px;
    color: var(--chalk-white);
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.42);
}

.hero p,
.page-title-card p,
.detail-info p {
    margin: 0;
    max-width: 760px;
    color: rgba(245, 245, 220, 0.90);
    font-size: 21px;
}

.hero-meta,
.detail-meta,
.card-meta,
.inline-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta,
.detail-meta {
    margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.inline-info span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 10px;
    color: rgba(245, 245, 220, 0.92);
    background: rgba(15, 26, 15, 0.56);
    border: 1px solid rgba(255, 250, 205, 0.24);
}

.hero-meta .hero-score,
.detail-meta span:first-child {
    color: var(--blackboard);
    background: var(--chalk-yellow);
    border-color: var(--chalk-yellow);
    font-weight: 800;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: 0.24s ease;
}

.btn.primary {
    color: var(--blackboard);
    background: var(--chalk-yellow);
    box-shadow: 0 12px 24px rgba(255, 250, 205, 0.16);
}

.btn.primary:hover {
    background: var(--chalk-white);
    transform: translateY(-2px);
}

.btn.ghost {
    color: var(--chalk-yellow);
    border: 1px solid rgba(255, 250, 205, 0.32);
    background: rgba(15, 26, 15, 0.42);
}

.btn.ghost:hover {
    color: var(--blackboard);
    background: var(--chalk-yellow);
}

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

.page-top {
    padding-top: 40px;
}

.home-search,
.filter-panel,
.page-title-card,
.panel-section,
.content-panel {
    border: 2px solid rgba(255, 250, 205, 0.22);
    border-radius: 22px;
    background: rgba(45, 74, 45, 0.82);
    box-shadow: var(--soft-shadow);
}

.home-search {
    padding: 20px;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 250, 205, 0.25);
    border-radius: 14px;
    outline: none;
    color: var(--chalk-white);
    background: rgba(15, 26, 15, 0.66);
    padding: 0 16px;
}

.quick-search input::placeholder,
.filter-panel input::placeholder {
    color: rgba(245, 245, 220, 0.55);
}

.quick-search button {
    min-width: 120px;
    border: 0;
    border-radius: 14px;
    color: var(--blackboard);
    background: var(--chalk-yellow);
    font-weight: 800;
}

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

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.section-title span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--blackboard);
    background: var(--chalk-yellow);
}

.section-title h2 {
    margin: 0;
    color: var(--chalk-white);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.1;
}

.section-more {
    color: var(--chalk-yellow);
    font-weight: 800;
}

.panel-section {
    padding: 32px;
}

.gradient-panel {
    background: linear-gradient(135deg, rgba(45, 74, 45, 0.92), rgba(26, 46, 26, 0.92));
    border-color: rgba(144, 238, 144, 0.28);
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-color: var(--chalk-yellow) rgba(15, 26, 15, 0.5);
}

.movie-card {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.18);
    border-radius: 18px;
    background: rgba(45, 74, 45, 0.86);
    box-shadow: var(--soft-shadow);
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 250, 205, 0.72);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32), 0 0 26px rgba(255, 250, 205, 0.10);
}

.card-cover {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: rgba(15, 26, 15, 0.88);
}

.movie-card-small .card-cover {
    height: 190px;
}

.movie-card-large .card-cover {
    height: 330px;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 26, 15, 0.78), transparent 58%);
    opacity: 0;
    transition: opacity 0.26s ease;
}

.movie-card:hover .cover-gradient {
    opacity: 1;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--blackboard);
    background: rgba(255, 250, 205, 0.92);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: 0.26s ease;
}

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

.score,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 9px;
    color: var(--chalk-yellow);
    background: rgba(15, 26, 15, 0.82);
    border: 1px solid rgba(255, 250, 205, 0.25);
    font-weight: 800;
    font-size: 15px;
}

.rank-badge {
    left: 12px;
    right: auto;
    color: var(--blackboard);
    background: var(--chalk-yellow);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--chalk-white);
    font-size: 22px;
    line-height: 1.18;
}

.card-body h3 a:hover {
    color: var(--chalk-yellow);
}

.card-desc {
    display: -webkit-box;
    min-height: 56px;
    margin: 0 0 12px;
    overflow: hidden;
    color: rgba(245, 245, 220, 0.74);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    gap: 8px;
    margin-bottom: 12px;
    color: rgba(245, 245, 220, 0.68);
    font-size: 16px;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(15, 26, 15, 0.50);
}

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

.tag-row span,
.genre-links a {
    display: inline-flex;
    padding: 3px 9px;
    border: 1px solid rgba(255, 250, 205, 0.24);
    border-radius: 999px;
    color: var(--chalk-yellow);
    background: rgba(15, 26, 15, 0.36);
    font-size: 15px;
}

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

.category-tile,
.category-card a {
    display: block;
    min-height: 156px;
    padding: 22px;
    border: 2px solid rgba(255, 250, 205, 0.18);
    border-radius: 20px;
    background: rgba(45, 74, 45, 0.78);
    box-shadow: var(--soft-shadow);
    transition: 0.24s ease;
}

.category-tile:hover,
.category-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 250, 205, 0.60);
}

.category-tile strong,
.category-card-cover span {
    display: block;
    color: var(--chalk-yellow);
    font-size: 26px;
    margin-bottom: 10px;
}

.category-tile span,
.category-card p {
    color: rgba(245, 245, 220, 0.78);
}

.category-card-cover {
    position: relative;
    height: 170px;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 14px;
    background: var(--blackboard-dark);
}

.category-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.category-card-cover span {
    position: absolute;
    left: 16px;
    bottom: 12px;
    margin: 0;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.5);
}

.list-stack {
    display: grid;
    gap: 14px;
}

.movie-list-item {
    display: grid;
    grid-template-columns: 58px 86px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 2px solid rgba(255, 250, 205, 0.16);
    border-radius: 18px;
    background: rgba(45, 74, 45, 0.74);
    transition: 0.24s ease;
}

.movie-list-item:hover {
    border-color: rgba(255, 250, 205, 0.56);
    transform: translateX(4px);
}

.movie-list-item img {
    width: 86px;
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--blackboard-dark);
}

.list-rank {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--blackboard);
    background: var(--chalk-yellow);
    font-weight: 900;
}

.list-main strong {
    display: block;
    margin-bottom: 4px;
    color: var(--chalk-white);
    font-size: 22px;
}

.list-main em {
    display: block;
    color: rgba(245, 245, 220, 0.72);
    font-style: normal;
}

.list-meta {
    color: var(--chalk-yellow);
    white-space: nowrap;
}

.page-title-card {
    padding: 34px;
}

.page-title-card h1 {
    font-size: clamp(40px, 5vw, 64px);
}

.filter-panel {
    padding: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(150px, 1fr));
    gap: 14px;
    align-items: end;
}

.filter-grid label {
    display: grid;
    gap: 8px;
    color: rgba(245, 245, 220, 0.76);
}

.filter-grid span {
    font-weight: 800;
    color: var(--chalk-yellow);
}

.movie-card.is-hidden,
.movie-list-item.is-hidden {
    display: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(245, 245, 220, 0.70);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: stretch;
    padding: 30px;
    border: 2px solid rgba(255, 250, 205, 0.18);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(45, 74, 45, 0.86), rgba(15, 26, 15, 0.62));
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: var(--blackboard-dark);
    box-shadow: var(--soft-shadow);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

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

.detail-info h1 {
    font-size: clamp(42px, 6vw, 72px);
}

.detail-tags {
    margin-bottom: 26px;
}

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

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

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 14px;
    border: 0;
    color: var(--chalk-white);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.30));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    margin: 0 auto;
    border-radius: 50%;
    color: var(--blackboard);
    background: var(--chalk-yellow);
    font-size: 36px;
    box-shadow: 0 0 34px rgba(255, 250, 205, 0.28);
}

.play-overlay strong {
    font-size: 28px;
}

.play-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.content-panel {
    padding: 30px;
}

.content-panel h2 {
    margin: 0 0 16px;
    color: var(--chalk-yellow);
    font-size: 34px;
}

.content-panel p {
    margin: 0;
    color: rgba(245, 245, 220, 0.88);
    font-size: 20px;
}

.inline-info {
    margin: 22px 0;
}

.genre-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 96px;
    gap: 18px;
    color: rgba(245, 245, 220, 0.70);
}

.footer-logo {
    color: var(--chalk-yellow);
    font-size: 26px;
    font-weight: 900;
}

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

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

    .filter-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .grid-4,
    .grid-5,
    .grid-6,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-poster img {
        max-height: 520px;
    }

    .movie-list-item {
        grid-template-columns: 48px 72px 1fr;
    }

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

@media (max-width: 760px) {
    body {
        font-size: 17px;
    }

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

    .logo {
        font-size: 24px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 2px solid rgba(255, 250, 205, 0.20);
        border-radius: 18px;
        background: rgba(15, 26, 15, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        text-align: center;
    }

    .hero,
    .hero-inner {
        min-height: 72vh;
    }

    .hero-inner {
        padding: 58px 0;
    }

    .hero p,
    .page-title-card p,
    .detail-info p {
        font-size: 18px;
    }

    .quick-search {
        grid-template-columns: 1fr;
    }

    .panel-section,
    .content-panel,
    .page-title-card,
    .detail-hero {
        padding: 22px;
    }

    .grid-4,
    .grid-5,
    .grid-6,
    .category-grid,
    .category-overview-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .card-cover,
    .movie-card-small .card-cover,
    .movie-card-large .card-cover {
        height: 320px;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 24px 0;
    }
}

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

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

    .movie-list-item {
        grid-template-columns: 42px 1fr;
    }

    .movie-list-item img {
        display: none;
    }

    .list-main,
    .list-meta {
        grid-column: 2;
    }

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

    .btn {
        width: 100%;
    }
}
