
/* =========================================================
   CINEVA — PREMIUM MOVIE & SERIES CARDS
   File: css/cards.css

   Features:
   - Equal card dimensions
   - Uniform poster proportions
   - Aligned titles and metadata
   - Premium hover animations
   - Horizontal carousels
   - Section separators
   - Responsive desktop, tablet and mobile
========================================================= */


/* =========================================================
   01. MOVIE GRID
========================================================= */

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 22px;
    width: 100%;
}


/* =========================================================
   02. MOVIE CARD
========================================================= */

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;

    overflow: hidden;
    isolation: isolate;

    background: var(--bg-card, #171727);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;

    color: #fff;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.movie-card:hover {
    transform: translateY(-6px);

    border-color: rgba(168, 85, 247, 0.55);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.38),
        0 5px 20px rgba(139, 53, 245, 0.15);
}


/* =========================================================
   03. POSTER
========================================================= */

.movie-poster {
    position: relative;

    flex: 0 0 auto;

    width: 100%;
    aspect-ratio: 2 / 3;

    overflow: hidden;

    background: #171727;
}

.movie-poster img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition: transform 0.6s ease;
}

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


/* =========================================================
   04. MOVIE TYPE BADGE
========================================================= */

.movie-type {
    position: absolute;
    top: 10px;
    left: 10px;

    z-index: 4;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 9px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;

    background: rgba(10, 10, 20, 0.82);
    backdrop-filter: blur(8px);

    color: #fff;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}


/* =========================================================
   05. POSTER OVERLAY
   Matches the actual home.js markup:
   .movie-overlay and .play-icon
========================================================= */

.movie-overlay {
    position: absolute;
    inset: 0;

    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(5, 5, 15, 0.55);

    opacity: 0;

    transition: opacity 0.35s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.play-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 55px;
    height: 55px;

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;

    background: var(--gradient-primary, linear-gradient(135deg, #8b35f5, #ed304b));

    color: #fff;
    font-size: 18px;

    box-shadow: 0 8px 25px rgba(139, 53, 245, 0.4);

    transform: scale(0.7);

    transition: transform 0.35s ease;
}

.movie-card:hover .play-icon {
    transform: scale(1);
}


/* =========================================================
   06. MOVIE INFORMATION
========================================================= */

.movie-info {
    display: flex;
    flex-direction: column;

    flex: 1 1 auto;

    min-width: 0;
    min-height: 88px;

    padding: 12px 11px 13px;
}


/* =========================================================
   07. MOVIE TITLE
   Actual JavaScript creates an h3 without a class.
========================================================= */

.movie-info h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;

    min-height: 39px;
    max-height: 39px;

    margin: 0;

    overflow: hidden;
    overflow-wrap: anywhere;

    color: #fff;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;

    transition: color 0.3s ease;
}

.movie-card:hover .movie-info h3 {
    color: #c18bff;
}


/* =========================================================
   08. MOVIE METADATA
========================================================= */

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 6px;

    width: 100%;
    min-width: 0;
    min-height: 20px;

    margin-top: 7px;

    overflow: hidden;

    color: var(--text-muted, #9292a8);

    font-size: 10px;
    font-weight: 600;
}

/* Keep metadata values from stretching cards */

.movie-meta > span {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-meta > span:first-child {
    flex: 1 1 auto;
}

.movie-meta > span:nth-child(2) {
    flex: 0 0 auto;
}

.movie-meta .movie-rating {
    flex: 0 0 auto;
    margin-left: auto;
}


/* =========================================================
   09. RATING
========================================================= */

.movie-rating {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    color: #ffc107;

    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.movie-rating i {
    font-size: 9px;
}


/* =========================================================
   10. POSTER PLACEHOLDER
========================================================= */

.poster-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    gap: 10px;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(139, 53, 245, 0.22),
            transparent 65%
        ),
        #151523;

    color: var(--text-muted, #9292a8);
}

.poster-placeholder i {
    font-size: 35px;
}

.poster-placeholder span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}


/* =========================================================
   11. ADDITIONAL POSTER BADGES
========================================================= */

.card-badges {
    position: absolute;
    top: 9px;
    left: 9px;
    right: 9px;

    z-index: 5;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    pointer-events: none;
}

.badge-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 8px;

    border-radius: 5px;

    color: #fff;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.4px;
    text-transform: uppercase;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.badge-new {
    background: #10bd86;
}

.badge-fhd {
    background: #ed304b;
}

.badge-hd {
    background: #287be7;
}

.badge-4k {
    background: #8b35f5;
}

.badge-premium {
    background: #e7a927;
    color: #17110a;
}

.badge-trending {
    background: #ff653d;
}

.badge-series {
    background: #7838e8;
}

.badge-episodes {
    padding: 5px 8px;

    border-radius: 5px;

    background: rgba(0, 0, 0, 0.78);
    color: #fff;

    font-size: 9px;
    font-weight: 800;
}


/* =========================================================
   12. GENRE LABEL
========================================================= */

.card-genre {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 5px 8px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;

    background: rgba(5, 5, 12, 0.78);

    color: #fff;

    font-size: 9px;
    font-weight: 700;

    backdrop-filter: blur(8px);
}

.card-genre i {
    color: #ffc107;
    font-size: 9px;
}


/* =========================================================
   13. VIEW COUNTER
========================================================= */

.card-views {
    position: absolute;
    right: 8px;
    bottom: 9px;

    z-index: 5;

    display: flex;
    align-items: center;
    gap: 5px;

    padding: 5px 8px;

    border-radius: 5px;

    background: rgba(0, 0, 0, 0.75);

    color: #fff;

    font-size: 9px;
    font-weight: 700;
}

.card-views i {
    color: #ffc107;
}


/* =========================================================
   14. FAVORITE BUTTON
========================================================= */

.card-favorite {
    position: absolute;
    top: 9px;
    right: 9px;

    z-index: 6;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;

    background: rgba(5, 5, 12, 0.78);

    color: #fff;

    font-size: 12px;

    opacity: 0;
    transform: scale(0.8);

    transition: all 0.3s ease;
}

.movie-card:hover .card-favorite {
    opacity: 1;
    transform: scale(1);
}

.card-favorite:hover,
.card-favorite.active {
    border-color: #ed304b;
    background: #ed304b;
    color: #fff;
}


/* =========================================================
   15. UPLOAD TIME
========================================================= */

.movie-upload-time {
    display: flex;
    align-items: center;
    gap: 5px;

    min-height: 20px;
    max-height: 20px;

    margin-top: 5px;

    overflow: hidden;

    color: #88889c;

    font-size: 9px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-upload-time i {
    font-size: 9px;
}


/* =========================================================
   16. CARD ACTIONS
========================================================= */

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;

    width: 100%;

    margin-top: auto;
    padding-top: 10px;
}

.card-watch-btn {
    display: flex;
    flex: 1;

    align-items: center;
    justify-content: center;
    gap: 6px;

    min-width: 0;
    min-height: 34px;

    padding: 8px;

    border-radius: 7px;

    background: var(--gradient-primary);

    color: #fff;

    font-size: 10px;
    font-weight: 800;

    transition: background 0.3s ease;
}

.card-watch-btn:hover {
    background: var(--gradient-hover, #7838e8);
}

.card-info-btn {
    display: flex;
    flex: 0 0 34px;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 7px;

    background: rgba(255, 255, 255, 0.07);

    color: var(--text-secondary, #b8b8ca);

    transition: all 0.3s ease;
}

.card-info-btn:hover {
    background: var(--primary, #8b35f5);
    color: #fff;
}


/* =========================================================
   17. HOVER INFORMATION
========================================================= */

.movie-hover-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 4;

    padding: 40px 12px 13px;

    background: linear-gradient(
        0deg,
        rgba(5, 5, 12, 0.98),
        rgba(5, 5, 12, 0.75),
        transparent
    );

    opacity: 0;
    transform: translateY(10px);

    pointer-events: none;

    transition: all 0.35s ease;
}

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

.movie-hover-info p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    overflow: hidden;

    color: rgba(255, 255, 255, 0.85);

    font-size: 10px;
    line-height: 1.7;
}


/* =========================================================
   18. LANDSCAPE CARD
========================================================= */

.movie-card.landscape .movie-poster {
    aspect-ratio: 16 / 9;
}

.movie-card.landscape .movie-poster img {
    object-fit: cover;
}


/* =========================================================
   19. CAROUSEL
========================================================= */

.movie-grid.horizontal-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;

    gap: 15px;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 5px 2px 18px;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    scrollbar-width: thin;
}

.movie-grid.horizontal-scroll .movie-card {
    flex: 0 0 190px;

    width: 190px;
    min-width: 190px;
    height: auto;

    scroll-snap-align: start;
}


/* =========================================================
   20. CAROUSEL ARROWS
========================================================= */

.movie-carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel-arrow {
    position: absolute;
    top: 40%;

    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;

    background: rgba(12, 12, 25, 0.9);
    backdrop-filter: blur(10px);

    color: #fff;
    font-size: 13px;

    cursor: pointer;

    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: scale(1.1);
}

.carousel-arrow.prev {
    left: -17px;
}

.carousel-arrow.next {
    right: -17px;
}


/* =========================================================
   21. SECTION SEPARATORS
   Matches .content-section in your homepage.
========================================================= */

.content-section {
    position: relative;

    padding-bottom: 30px;
    margin-bottom: 30px;
}

/* Horizontal line between homepage sections */

.content-section + .content-section,
#category-sections .content-section {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding-top: 28px;
}

/* Also separate direct homepage sections inside main */

main > .content-section + .content-section {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}


/* =========================================================
   22. SECTION HEADINGS
   Matches your .section-heading HTML.
========================================================= */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 11px;

    min-width: 0;
}

.section-icon {
    display: flex;
    flex: 0 0 39px;

    align-items: center;
    justify-content: center;

    width: 39px;
    height: 39px;

    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;

    background: rgba(139, 53, 245, 0.13);

    color: #c18bff;

    font-size: 16px;
}

.section-title h2 {
    margin: 0;

    color: #fff;

    font-size: 19px;
    font-weight: 900;
    line-height: 1.35;
}

.section-title p {
    margin: 4px 0 0;

    color: var(--text-muted, #9292a8);

    font-size: 11px;
    line-height: 1.4;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    flex: 0 0 auto;

    color: #c18bff;

    font-size: 11px;
    font-weight: 800;

    text-decoration: none;

    transition: gap 0.25s ease, color 0.25s ease;
}

.view-all:hover {
    gap: 11px;
    color: #fff;
}


/* =========================================================
   23. LOADING AND EMPTY STATES
========================================================= */

.loading-content,
.empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 160px;

    padding: 25px;

    color: var(--text-muted, #9292a8);

    text-align: center;
}

.empty-content i {
    margin-bottom: 12px;
    font-size: 30px;
    color: #a65bfa;
}

.empty-content h3 {
    margin: 0 0 7px;
    color: #fff;
    font-size: 15px;
}

.empty-content p {
    margin: 0;
    font-size: 11px;
}

.content-spinner {
    width: 30px;
    height: 30px;

    margin-bottom: 12px;

    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #a65bfa;
    border-radius: 50%;

    animation: cinevaSpin 0.8s linear infinite;
}

@keyframes cinevaSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   24. SKELETON LOADING
========================================================= */

.movie-skeleton {
    display: flex;
    flex-direction: column;

    height: 100%;

    overflow: hidden;

    border-radius: 12px;

    background: var(--bg-card, #171727);
}

.skeleton-poster {
    flex: 0 0 auto;

    width: 100%;
    aspect-ratio: 2 / 3;
}

.skeleton-info {
    flex: 1;
    min-height: 100px;

    padding: 12px;
}

.skeleton-line {
    height: 10px;

    margin-bottom: 10px;

    border-radius: 5px;

    background: #252538;
}

.skeleton-line.short {
    width: 55%;
}

.skeleton-line.medium {
    width: 75%;
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        #171727 25%,
        #28283b 50%,
        #171727 75%
    );

    background-size: 200% 100%;

    animation: skeletonLoading 1.5s infinite linear;
}

@keyframes skeletonLoading {
    to {
        background-position: -200% 0;
    }
}


/* =========================================================
   25. IMAGE ERROR
========================================================= */

.movie-poster img.image-error {
    display: none;
}


/* =========================================================
   26. EMPTY GRID
========================================================= */

.movie-grid:empty::after {
    content: "New entertainment coming soon...";

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 100px;

    color: var(--text-muted, #9292a8);

    font-size: 12px;
}


/* =========================================================
   27. LARGE SCREENS
========================================================= */

@media (min-width: 1500px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 24px;
    }
}


/* =========================================================
   28. TABLETS
========================================================= */

@media (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 17px;
    }

    .movie-grid.horizontal-scroll .movie-card {
        flex-basis: 175px;
        width: 175px;
        min-width: 175px;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
    }
}


/* =========================================================
   29. MOBILE
========================================================= */

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 13px;
    }

    .movie-info {
        padding: 10px 8px 11px;
    }

    .movie-info h3 {
        min-height: 34px;
        max-height: 34px;
        font-size: 11px;
    }

    .movie-meta {
        font-size: 9px;
    }

    .movie-grid.horizontal-scroll {
        gap: 12px;
    }

    .movie-grid.horizontal-scroll .movie-card {
        flex-basis: 155px;
        width: 155px;
        min-width: 155px;
    }

    .carousel-arrow {
        display: none;
    }

    .card-favorite {
        opacity: 1;
        transform: scale(1);

        width: 29px;
        height: 29px;
    }

    .movie-hover-info {
        display: none;
    }

    .content-section {
        padding-bottom: 22px;
        margin-bottom: 22px;
    }

    .content-section + .content-section,
    #category-sections .content-section {
        padding-top: 22px;
    }

    .section-title h2 {
        font-size: 16px;
    }

    .section-title p {
        font-size: 10px;
    }
}


/* =========================================================
   30. SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .movie-grid.horizontal-scroll .movie-card {
        flex-basis: 145px;
        width: 145px;
        min-width: 145px;
    }

    .movie-card {
        border-radius: 9px;
    }

    .movie-info {
        padding: 9px 8px 10px;
    }

    .movie-info h3 {
        min-height: 33px;
        max-height: 33px;
        font-size: 11px;
    }

    .movie-meta {
        gap: 4px;
        font-size: 8px;
    }

    .movie-type {
        top: 7px;
        left: 7px;

        padding: 4px 6px;

        font-size: 8px;
    }

    .card-badges {
        top: 7px;
        left: 7px;
        right: 7px;
    }

    .card-badge {
        padding: 4px 6px;
        font-size: 8px;
    }

    .card-genre {
        padding: 4px 6px;
        font-size: 8px;
    }

    .card-views {
        right: 6px;
        bottom: 7px;
        font-size: 8px;
    }

    .movie-upload-time {
        font-size: 8px;
    }

    .card-actions {
        gap: 6px;
    }

    .card-watch-btn {
        font-size: 9px;
    }

    .section-heading {
        gap: 8px;
        margin-bottom: 15px;
    }

    .section-icon {
        flex-basis: 33px;
        width: 33px;
        height: 33px;
        font-size: 13px;
    }

    .section-title {
        gap: 8px;
    }

    .section-title h2 {
        font-size: 14px;
    }

    .section-title p {
        font-size: 9px;
    }

    .view-all {
        gap: 4px;
        font-size: 9px;
    }
}


/* =========================================================
   31. TOUCH DEVICES
========================================================= */

@media (hover: none) {
    .movie-card:hover {
        transform: none;
    }

    .movie-card:hover .movie-poster img {
        transform: none;
    }

    .movie-overlay {
        display: none;
    }

    .card-favorite {
        opacity: 1;
        transform: none;
    }

    .movie-hover-info {
        display: none;
    }
}


/* =========================================================
   32. ACCESSIBILITY
========================================================= */

.movie-card:focus-visible {
    outline: 2px solid var(--primary-light, #c18bff);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .movie-card,
    .movie-poster img,
    .movie-overlay,
    .play-icon,
    .carousel-arrow,
    .view-all {
        transition: none !important;
        animation: none !important;
    }
}
/* =========================================
   CINEVA — POSTER IMAGE FIX
========================================= */

.movie-poster {
    position: relative;
    overflow: hidden;
    background: #151323;
}

.movie-poster > img {
    position: absolute;
    inset: 0;
    z-index: 1;

    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;
    object-position: center;

    opacity: 1;
    visibility: visible;
}

.movie-poster .poster-placeholder {
    position: absolute;
    inset: 0;
    z-index: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 10px;

    background: linear-gradient(
        145deg,
        #25183e,
        #151323
    );

    color: #8580a8;
}

.movie-poster .poster-placeholder i {
    font-size: 34px;
}

.movie-poster .poster-placeholder span {
    font-size: 11px;
    letter-spacing: 3px;
}

/* =========================================================
   CINEVA — MOVIE TRANSLATOR BADGE
========================================================= */

.movie-poster {
    position: relative;
    overflow: hidden;
}

/* Translator badge — top right */

.movie-translator-badge {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 5;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    max-width: calc(100% - 95px);
    padding: 6px 10px;

    color: #ffffff;
    background: rgba(8, 8, 18, 0.90);

    border: 1px solid rgba(168, 85, 247, 0.65);
    border-radius: 6px;

    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.45px;
    line-height: 1.2;
    text-transform: uppercase;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.45),
        0 0 10px rgba(139, 53, 245, 0.15);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    pointer-events: none;
    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

.movie-translator-badge i {
    flex-shrink: 0;
    color: #c084fc;
    font-size: 12px;
}

/* Slight enhancement when hovering over a card */

.movie-card:hover .movie-translator-badge {
    background: rgba(20, 12, 35, 0.96);
    border-color: #a855f7;
}
/* =========================================================
   CINEVA PRO — UNIFIED HOMEPAGE SECTION WIDTH
   Align Latest Added and every category section
========================================================= */

main {
    width: 100%;
    box-sizing: border-box;
}

/* Every homepage section shares the same horizontal boundaries */
main .content-section,
#category-sections .content-section {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;

    padding-left: 20px;
    padding-right: 20px;

    box-sizing: border-box;
}

/* All homepage content grids use the same six-column layout */
main .content-section .movie-grid,
#category-sections .content-section .movie-grid {
    display: grid;

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

    align-items: stretch;
    gap: 20px;

    width: 100%;
    min-width: 0;
}

/* Consistent card sizing */
main .content-section .movie-card,
#category-sections .content-section .movie-card {
    width: 100%;
    min-width: 0;
    height: 100%;
}

/* Latest Added uses exactly the same grid alignment */
#latestAdded .movie-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Keep section headings aligned with their cards */
main .content-section .section-heading,
#category-sections .content-section .section-heading {
    width: 100%;
}

/* =========================================================
   RESPONSIVE GRID
========================================================= */

@media (max-width: 1100px) {
    main .content-section .movie-grid,
    #category-sections .content-section .movie-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 900px) {
    main .content-section,
    #category-sections .content-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    main .content-section .movie-grid,
    #category-sections .content-section .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 600px) {
    main .content-section .movie-grid,
    #category-sections .content-section .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 11px;
    }
}

@media (max-width: 420px) {
    main .content-section,
    #category-sections .content-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    main .content-section .movie-grid,
    #category-sections .content-section .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }
}


/* =========================================================
   CINEVA — CONSISTENT CONTENT CARDS & TRANSLATOR LABELS
   Shared by homepage, category, movie, series and discovery grids.
========================================================= */
.movie-grid {
    align-items: stretch;
}

.movie-grid .movie-card,
.content-section .movie-card,
#category-sections .movie-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.movie-card .movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    isolation: isolate;
    border-radius: inherit;
    background: #121221;
}

.movie-card .movie-poster > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.movie-card .movie-info {
    min-width: 0;
    flex: 1 1 auto;
}

.movie-translator-badge {
    top: 10px;
    right: 9px;
    max-width: calc(100% - 18px);
    min-height: 25px;
    padding: 5px 9px;
    gap: 5px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .35px;
    line-height: 1.15;
    border-radius: 7px;
    color: #fff;
    background: rgba(10, 8, 20, .88);
    border: 1px solid rgba(192, 132, 252, .55);
    box-shadow: 0 5px 16px rgba(0,0,0,.32);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.movie-translator-badge i {
    color: #d8b4fe;
    font-size: 10px;
}

@media (max-width: 600px) {
    .movie-translator-badge {
        top: 7px;
        right: 7px;
        min-height: 22px;
        max-width: calc(100% - 14px);
        padding: 4px 7px;
        font-size: 9px;
        letter-spacing: .2px;
    }
}


/* =========================================================
   CINEVA — FAVORITES: TOUCH-FIRST CARD CONTROLS
========================================================= */
.movie-card-link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.movie-card > .card-favorite {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    background: rgba(8,8,18,.88);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    opacity: 1;
    transform: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.movie-card > .card-favorite:active {
    transform: scale(.92);
}
.movie-card > .card-favorite.active {
    border-color: #ed304b;
    background: #ed304b;
    color: #fff;
}
.cineva-favorite-toast {
    position: fixed;
    z-index: 999980;
    left: 50%;
    bottom: 88px;
    max-width: calc(100vw - 32px);
    padding: 11px 16px;
    border: 1px solid rgba(168,85,247,.35);
    border-radius: 999px;
    background: rgba(18,18,33,.97);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity .2s ease, transform .2s ease;
}
.cineva-favorite-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
@media (hover: none), (pointer: coarse) {
    .movie-card > .card-favorite {
        opacity: 1 !important;
        transform: none !important;
        width: 42px;
        height: 42px;
    }
}
@media (max-width: 480px) {
    .movie-card > .card-favorite {
        top: 7px;
        right: 7px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}




/* Translator portraits replace the generic language symbol on movie cards. */
.movie-translator-badge{display:inline-flex;align-items:center;gap:6px;max-width:calc(100% - 20px)}
.movie-translator-avatar{position:relative;display:grid;place-items:center;width:23px;height:23px;flex:0 0 23px;overflow:hidden;border-radius:50%;border:1px solid rgba(255,255,255,.55);background:linear-gradient(135deg,#a855f7,#6334c9);color:#fff;font-size:10px;font-weight:900}
.movie-translator-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.movie-translator-avatar-fallback{display:grid;place-items:center;width:100%;height:100%}
.movie-translator-avatar-fallback[hidden]{display:none}
.movie-translator-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}


/* Keep translator badges at their original compact size; portraits link to profiles. */


/* Compact green latest-episode text on series cards. */
.movie-latest-episode{display:block;margin:5px 0 6px;color:#34d399;font-size:10px;font-weight:700;line-height:1.2;letter-spacing:.25px;text-transform:uppercase}
@media(max-width:600px){.movie-latest-episode{margin:4px 0 5px;font-size:9px;letter-spacing:.15px}}
