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

:root {
    --blackboard: #1a2e1a;
    --blackboard-deep: #0f1f13;
    --blackboard-soft: #223a22;
    --chalk-white: #f5f5dc;
    --chalk-yellow: #fffacd;
    --chalk-blue: #add8e6;
    --chalk-green: #90ee90;
    --chalk-pink: #ffb6c1;
    --vintage-gold: #ffd700;
    --vintage-beige: #d4c5aa;
    --ink-shadow: rgba(0, 0, 0, 0.42);
    --chalk-shadow: 0 2px 4px rgba(245, 245, 220, 0.22);
    --panel: rgba(245, 245, 220, 0.08);
    --panel-strong: rgba(245, 245, 220, 0.14);
    --border: rgba(245, 245, 220, 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 15% 10%, rgba(255, 250, 205, 0.1), transparent 26rem),
        radial-gradient(circle at 85% 5%, rgba(173, 216, 230, 0.12), transparent 24rem),
        linear-gradient(135deg, var(--blackboard-deep), var(--blackboard) 42%, #213a21);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(245, 245, 220, 0.18);
    background: rgba(15, 31, 19, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--chalk-yellow);
    font-family: "Patrick Hand", cursive;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-shadow: var(--chalk-shadow);
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blackboard-deep);
    background: var(--chalk-yellow);
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(255, 250, 205, 0.22);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: var(--chalk-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    padding: 8px 12px;
    cursor: pointer;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-link {
    color: rgba(245, 245, 220, 0.82);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--chalk-yellow);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(290px, 28vw);
}

.nav-search input,
.search-panel input {
    width: 100%;
    color: var(--chalk-white);
    border: 1px solid rgba(245, 245, 220, 0.26);
    border-radius: 999px;
    outline: none;
    background: rgba(245, 245, 220, 0.08);
    padding: 10px 16px;
}

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

.nav-search button,
.primary-btn,
.secondary-btn,
.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.primary-btn {
    color: var(--blackboard-deep);
    background: var(--chalk-yellow);
    padding: 0 18px;
    box-shadow: 0 8px 18px rgba(255, 250, 205, 0.14);
}

.secondary-btn {
    color: var(--chalk-white);
    border: 1px solid var(--border);
    background: rgba(245, 245, 220, 0.1);
    padding: 0 18px;
}

.text-btn {
    color: var(--chalk-yellow);
    min-height: auto;
    border-radius: 0;
    background: transparent;
}

.nav-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.text-btn:hover {
    transform: translateY(-2px);
}

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

.hero-carousel {
    position: relative;
    min-height: clamp(580px, 72vh, 820px);
    margin: 28px auto 44px;
    overflow: hidden;
    border: 1px solid rgba(245, 245, 220, 0.26);
    border-radius: 34px;
    background: var(--blackboard-soft);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.58fr);
    align-items: end;
    gap: clamp(24px, 5vw, 64px);
    opacity: 0;
    pointer-events: none;
    padding: clamp(30px, 6vw, 72px);
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 31, 19, 0.94), rgba(15, 31, 19, 0.78) 44%, rgba(15, 31, 19, 0.34)),
        radial-gradient(circle at 18% 18%, rgba(255, 250, 205, 0.15), transparent 24rem);
}

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

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--chalk-yellow);
    border: 1px dashed rgba(255, 250, 205, 0.5);
    border-radius: 999px;
    background: rgba(255, 250, 205, 0.08);
    padding: 8px 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1,
.page-title,
.detail-title {
    margin: 18px 0 16px;
    color: var(--chalk-white);
    font-family: "Patrick Hand", cursive;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: 0.03em;
    text-shadow: var(--chalk-shadow);
}

.hero-content p {
    max-width: 700px;
    margin: 0 0 24px;
    color: rgba(245, 245, 220, 0.9);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.78;
}

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

.hero-meta span,
.detail-meta span {
    color: var(--chalk-white);
    border: 1px solid rgba(245, 245, 220, 0.24);
    border-radius: 999px;
    background: rgba(245, 245, 220, 0.08);
    padding: 7px 12px;
}

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

.hero-poster {
    align-self: center;
    justify-self: end;
    width: min(350px, 100%);
    overflow: hidden;
    border: 8px solid rgba(245, 245, 220, 0.24);
    border-radius: 30px;
    background: rgba(245, 245, 220, 0.1);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.carousel-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    color: var(--chalk-white);
    border: 1px solid rgba(245, 245, 220, 0.28);
    border-radius: 50%;
    background: rgba(15, 31, 19, 0.6);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.carousel-control:hover {
    color: var(--blackboard-deep);
    background: var(--chalk-yellow);
}

.carousel-control.prev {
    left: 18px;
}

.carousel-control.next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(245, 245, 220, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section-block {
    margin: 44px 0;
}

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

.section-head h2,
.category-card h2,
.detail-section h2,
.player-section h2 {
    margin: 0;
    color: var(--chalk-yellow);
    font-family: "Patrick Hand", cursive;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.03em;
}

.section-head p,
.category-card p,
.page-lead,
.detail-section p {
    margin: 8px 0 0;
    color: rgba(245, 245, 220, 0.76);
    line-height: 1.8;
}

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

.quick-link,
.category-card {
    display: block;
    min-height: 128px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(245, 245, 220, 0.11), rgba(245, 245, 220, 0.05));
    padding: 22px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.quick-link:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 250, 205, 0.64);
    background: rgba(245, 245, 220, 0.13);
}

.quick-link strong {
    display: block;
    color: var(--chalk-yellow);
    font-family: "Patrick Hand", cursive;
    font-size: 2rem;
}

.quick-link span {
    display: block;
    margin-top: 8px;
    color: rgba(245, 245, 220, 0.76);
    line-height: 1.6;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(245, 245, 220, 0.08);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(245, 245, 220, 0.08);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    color: var(--blackboard-deep);
    border-radius: 999px;
    background: var(--chalk-yellow);
    padding: 7px 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    color: var(--blackboard-deep);
    border-radius: 12px;
    background: var(--vintage-gold);
}

.card-body {
    padding: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-tags span,
.tag-list span {
    color: var(--chalk-blue);
    border: 1px dashed rgba(173, 216, 230, 0.42);
    border-radius: 999px;
    background: rgba(173, 216, 230, 0.08);
    padding: 4px 8px;
    font-size: 0.82rem;
}

.card-body h3 {
    margin: 0;
    color: var(--chalk-white);
    font-size: 1.08rem;
    line-height: 1.35;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 3.9em;
    margin: 10px 0 14px;
    overflow: hidden;
    color: rgba(245, 245, 220, 0.72);
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: rgba(245, 245, 220, 0.62);
    font-size: 0.9rem;
}

.card-meta span + span::before,
.rank-meta span + span::before {
    content: "·";
    margin-right: 10px;
    color: rgba(245, 245, 220, 0.34);
}

.page-hero,
.detail-hero {
    margin: 28px 0 36px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 250, 205, 0.12), transparent 22rem),
        linear-gradient(145deg, rgba(245, 245, 220, 0.12), rgba(245, 245, 220, 0.05));
    padding: clamp(28px, 5vw, 58px);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.24);
}

.page-title {
    margin-top: 12px;
    font-size: clamp(2.6rem, 6vw, 5rem);
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 28px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(245, 245, 220, 0.07);
    padding: 14px;
}

.search-panel input {
    border-radius: 18px;
}

.empty-state {
    display: none;
    border: 1px dashed rgba(245, 245, 220, 0.35);
    border-radius: 20px;
    color: rgba(245, 245, 220, 0.75);
    padding: 24px;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(245, 245, 220, 0.08);
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-number {
    color: var(--chalk-yellow);
    font-family: "Patrick Hand", cursive;
    font-size: 2.5rem;
    text-align: center;
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
}

.rank-cover img {
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.rank-content p {
    margin: 0 0 10px;
    color: rgba(245, 245, 220, 0.74);
    line-height: 1.65;
}

.rank-meta {
    color: rgba(245, 245, 220, 0.66);
}

.rank-meta strong {
    color: var(--chalk-yellow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    color: rgba(245, 245, 220, 0.66);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 54px);
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(245, 245, 220, 0.18);
    border-radius: 28px;
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

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

.detail-title {
    margin-top: 10px;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.detail-lead {
    color: rgba(245, 245, 220, 0.86);
    font-size: 1.1rem;
    line-height: 1.9;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.player-section,
.detail-section {
    margin: 36px 0;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(245, 245, 220, 0.08);
    padding: clamp(18px, 4vw, 30px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.video-frame {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid rgba(245, 245, 220, 0.2);
    border-radius: 26px;
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 60px rgba(0, 0, 0, 0.32);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--chalk-white);
    border: 0;
    background: radial-gradient(circle, rgba(15, 31, 19, 0.18), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blackboard-deep);
    border-radius: 50%;
    background: var(--chalk-yellow);
    font-size: 2.4rem;
    box-shadow: 0 0 34px rgba(255, 250, 205, 0.32);
}

.play-text {
    font-size: 1.1rem;
    font-weight: 900;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

.detail-copy {
    color: rgba(245, 245, 220, 0.82);
    font-size: 1.03rem;
    line-height: 1.9;
}

.detail-copy p {
    margin: 0 0 18px;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(245, 245, 220, 0.18);
    background: rgba(15, 31, 19, 0.8);
}

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

.footer-inner p {
    margin: 0;
    color: rgba(245, 245, 220, 0.68);
}

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

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

@media (max-width: 860px) {
    .nav-shell {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin: 0;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(15, 31, 19, 0.94);
        padding: 12px;
    }

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

    .nav-link {
        padding: 10px 12px;
    }

    .nav-search {
        order: 4;
        width: 100%;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 48px 24px 74px;
    }

    .hero-poster {
        display: none;
    }

    .carousel-control {
        display: none;
    }

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

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

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

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

@media (max-width: 620px) {
    .page-main,
    .nav-shell,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

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

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

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

    .card-body {
        padding: 13px;
    }

    .card-body p {
        display: none;
    }

    .rank-row {
        grid-template-columns: 42px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-cover img {
        width: 72px;
    }

    .rank-content p {
        display: none;
    }

    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }
}
