:root {
    --max: 1280px;
    --card-radius: 14px;
}

.movie-page {
    padding: 1.6rem 0 2.2rem;
}

.movie-banner {
    margin-bottom: 1.1rem;
}

.movie-banner-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.9fr);
    gap: 0.95rem;
    align-items: center;
    padding: 0;
}

.movie-banner-copy {
    text-align: center;
    display: grid;
    place-content: center;
    min-height: 180px;
    padding: 0.5rem 0.3rem;
}

.movie-banner h1 {
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    margin-bottom: 0.48rem;
    letter-spacing: 0.15px;
}

.movie-banner p {
    color: #d5dde9;
    font-size: 0.95rem;
    max-width: 80ch;
    margin-inline: auto;
}

.movie-banner-media {
    border-radius: 12px;
    overflow: hidden;
    min-height: 180px;
}

.movie-banner-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.categories-strip {
    margin-top: 30px;
    margin-bottom: 30px;
}

.section-title {
    font-size: clamp(1.35rem, 2.5vw, 1.95rem);
    margin-top: 0.75rem;
    margin-bottom: 0.9rem;
    letter-spacing: 0.2px;
}

.category-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.category-card {
    /* Match the static reference exactly; anchors must not stretch this row. */
    height: 106px;
    border-radius: var(--card-radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.85rem 0.9rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #f7f9ff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(80deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.25));
    z-index: 0;
}

.category-card span,
.filter-icon {
    z-index: 1;
    position: relative;
}

.category-card span {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
}

/* The permanent All entry retains the original filter-card artwork. */
.cat-all {
    background-image: url('/assets/imgs/img/10001.svg');
}

/* The icon is limited to the global filter entry rather than API categories. */
.filter-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.8rem;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.content-module {
    margin-top: 1.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 1.4rem;
}

.ai-module {
    margin-top: 30px;
}

.ai-module + .content-module {
    margin-top: 30px;
}

.module-title {
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    margin-top: 0.95rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.15px;
}

.module-title.centered,
.module-copy.centered {
    text-align: center;
    margin-inline: auto;
}

#encyclopedia .module-title {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
}

#encyclopedia .encyclopedia-title {
    margin-top: 3rem;
}

.golden-module .module-grid {
    margin-top: 1.7rem;
}

.module-copy {
    color: var(--muted);
    font-size: 0.96rem;
    max-width: 86ch;
}

.module-copy.fluid {
    width: 100%;
    max-width: none;
}

.module-grid {
    margin-top: 0.95rem;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.ai-highlight {
    margin-top: 0.85rem;
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 0.55rem;
    align-items: center;
    padding: 0.85rem 1.6rem;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(47, 128, 255, 0.4) 0%, rgba(34, 197, 94, 0.34) 100%);
    border: 1px solid rgba(47, 128, 255, 0.45);
}

.ai-content h2 {
    margin-top: 0;
}

.ai-content {
    max-width: 760px;
    justify-self: start;
}

.ai-content p {
    margin-bottom: 0;
    line-height: 1.75;
    font-size: 1rem;
    color: #ebf2ff;
    width: 100%;
    max-width: none;
}

.ai-trend-list {
    margin-top: 0.95rem;
    display: grid;
    gap: 0.55rem;
    width: 100%;
    max-width: none;
}

.ai-trend-item {
    color: #dbe7fb;
    font-size: 0.95rem;
    line-height: 1.65;
}

.trending-movie-grid {
    margin-top: 1.6rem;
    margin-bottom: 1.8rem;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
}

.trending-movie-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.6rem;
}

/* Only linked cards receive interaction styling; the page's other static card rows remain unchanged. */
a.trending-movie-card {
    color: inherit;
    display: block;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Pointer and keyboard feedback make the full-card detail action discoverable. */
a.trending-movie-card:hover,
a.trending-movie-card:focus-visible {
    border-color: rgba(47, 128, 255, 0.9);
    background: rgba(47, 128, 255, 0.1);
}

/* Preserve a strong accessible focus boundary around the complete card. */
a.trending-movie-card:focus-visible {
    outline: 2px solid rgba(47, 128, 255, 0.9);
    outline-offset: 3px;
}

.trending-movie-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0.55rem;
}

.trending-movie-title {
    font-size: 1rem;
    color: #f5f8ff;
    margin-bottom: 0.28rem;
    line-height: 1.3;
}

.trending-movie-desc {
    color: #cfd5df;
    font-size: 0.88rem;
    line-height: 1.45;
}

.reviews-grid {
    margin-top: 2.2rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.review-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.review-user {
    color: #eaf1ff;
    font-size: 0.9rem;
    font-weight: 700;
}

.review-stars {
    color: #46d7c1;
    font-size: 0.86rem;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.review-text {
    color: #d3dae5;
    font-size: 0.88rem;
    line-height: 1.5;
}

.ai-image-wrap {
    display: flex;
    justify-content: flex-end;
}

.ai-image-wrap img {
    width: 100%;
    max-width: 380px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(47, 128, 255, 0.35);
    display: block;
    margin-left: auto;
}

.module-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.02);
}

.module-card h3 {
    font-size: 1.16rem;
    margin-top: 0.45rem;
    margin-bottom: 0.35rem;
    color: #46d7c1;
}

.card-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    margin-right: 0.45rem;
    border-radius: 999px;
    background: rgba(47, 128, 255, 0.2);
    border: 1px solid rgba(47, 128, 255, 0.5);
    font-size: 0.86rem;
    line-height: 1;
    vertical-align: -0.12rem;
}

.module-card p {
    color: #cfd4de;
    font-size: 0.93rem;
}

.badge-line {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.info-badge {
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.84rem;
    border: 1px solid rgba(47, 128, 255, 0.45);
    background: rgba(47, 128, 255, 0.12);
    color: #dbe8ff;
}

.faq-list {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.65rem;
}

.faq-module {
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

.reviews-module .module-title {
    margin-bottom: 1rem;
}

.reviews-module .module-copy {
    margin-top: 0.2rem;
}

.reviews-module + .faq-module {
    margin-top: 2.8rem;
}

.faq-module .module-title {
    margin-bottom: 0.9rem;
}

.faq-module .module-copy {
    margin-top: 0.2rem;
}

.faq-module .faq-list {
    margin-top: 1.5rem;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.015);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.1rem;
    color: #7ddfcf;
    line-height: 1;
    flex: 0 0 auto;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-question {
    font-size: 1rem;
    margin-top: 0.4rem;
    color: #f3f6ff;
    font-weight: 700;
}

.faq-item p {
    color: #cfd4de;
    font-size: 0.92rem;
    margin-top: 0.5rem;
}

@media (max-width: 1180px) {
    .category-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

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

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

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

    .movie-banner-inner {
        grid-template-columns: 1fr;
    }

    .movie-banner-media {
        min-height: 210px;
    }

    .movie-banner-copy {
        min-height: auto;
        padding: 0.2rem 0;
    }
}

@media (max-width: 760px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

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

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

    .trending-movie-grid {
        display: flex;
        gap: 0.7rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
    }

    .trending-movie-card {
        flex: 0 0 74%;
        scroll-snap-align: start;
    }

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

    .ai-highlight {
        grid-template-columns: 1fr;
    }

    .ai-image-wrap {
        justify-content: center;
    }

    .ai-image-wrap img {
        max-width: 460px;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 15px;
        line-height: 1.62;
    }

    h1 {
        font-size: clamp(1.25rem, 6vw, 1.62rem);
        line-height: 1.24;
    }

    h2 {
        font-size: clamp(1.12rem, 5.4vw, 1.42rem);
        line-height: 1.3;
    }

    h3 {
        font-size: clamp(1rem, 4.9vw, 1.16rem);
        line-height: 1.35;
    }

    p,
    li,
    summary {
        font-size: 0.92rem;
        line-height: 1.65;
    }
}

@media (max-width: 760px) {
}
