
/* =========================================================
   CINEVA — PREMIUM DISCOVERY / GENRE PAGE
   File: css/genre.css
========================================================= */

.genre-page {
    min-height: 100vh;
    background: #080812;
    color: #f7f5ff;
}

/* HERO */

.genre-main {
    min-height: 65vh;
}

.genre-hero {
    position: relative;
    overflow: hidden;
    padding: 125px 0 65px;
    background:
        radial-gradient(ellipse at 78% 35%, rgba(139, 53, 245, .20), transparent 38%),
        radial-gradient(ellipse at 12% 90%, rgba(239, 49, 94, .10), transparent 34%),
        linear-gradient(135deg, #0d0b1b, #080812 68%);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.genre-hero::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -130px;
    top: -220px;
    border: 1px solid rgba(168, 85, 247, .18);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(168, 85, 247, .025),
        0 0 0 95px rgba(168, 85, 247, .018);
    pointer-events: none;
}

.genre-hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    left: 35%;
    bottom: -250px;
    background: #8b35f5;
    filter: blur(150px);
    opacity: .18;
    pointer-events: none;
}

.genre-hero-inner {
    position: relative;
    z-index: 1;
}

.genre-breadcrumb {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 30px;
    color: #9290a7;
    font-size: 12px;
    font-weight: 600;
}

.genre-breadcrumb a {
    color: #c3b5e9;
    text-decoration: none;
    transition: color .2s ease;
}

.genre-breadcrumb a:hover {
    color: #b77aff;
}

.genre-breadcrumb i {
    font-size: 9px;
    color: #69657d;
}

.genre-eyebrow,
.genre-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #b77aff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.genre-eyebrow i {
    font-size: 13px;
}

.genre-hero-copy h1 {
    margin: 16px 0 13px;
    max-width: 850px;
    color: #fff;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -2.5px;
}

.genre-hero-copy h1 span {
    color: #a855f7;
    background: linear-gradient(100deg, #c084fc, #8b35f5 60%, #ef315e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.genre-hero-copy p {
    max-width: 620px;
    margin: 0;
    color: #a6a2b9;
    font-size: 14px;
    line-height: 1.9;
}

.genre-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.genre-stat {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    color: #c8c3d8;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}

.genre-stat i {
    color: #b77aff;
}

/* MAIN CONTENT */

.genre-content-section {
    padding-top: 65px;
    padding-bottom: 90px;
}

.genre-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 27px;
}

.genre-section-kicker {
    font-size: 9px;
}

.genre-section-heading h2 {
    margin: 9px 0 7px;
    color: #fff;
    font-size: clamp(23px, 3vw, 31px);
    font-weight: 800;
    letter-spacing: -.8px;
}

.genre-section-heading p {
    margin: 0;
    color: #8f8ba3;
    font-size: 12px;
    line-height: 1.7;
}

.genre-result-counter {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 11px 15px;
    background: rgba(139,53,245,.09);
    border: 1px solid rgba(168,85,247,.18);
    border-radius: 12px;
}

.genre-result-counter strong {
    color: #c084fc;
    font-size: 20px;
    font-weight: 800;
}

.genre-result-counter span {
    color: #aaa5bd;
    font-size: 10px;
    font-weight: 600;
}

/* TOOLBAR */

.genre-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(22,20,39,.94), rgba(15,14,28,.94));
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 17px;
    box-shadow: 0 15px 40px rgba(0,0,0,.16);
}

.genre-search-field {
    display: flex;
    align-items: center;
    gap: 11px;
    width: min(430px, 100%);
    min-height: 45px;
    padding: 0 13px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
}

.genre-search-field > i {
    color: #a855f7;
    font-size: 13px;
}

.genre-search-field input {
    width: 100%;
    min-width: 0;
    color: #fff;
    background: transparent;
    border: 0;
    outline: none;
    font: inherit;
    font-size: 11px;
}

.genre-search-field input::placeholder {
    color: #77738c;
}

.genre-search-field button {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    flex-shrink: 0;
    color: #aaa5bd;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.genre-search-field button:hover {
    color: #fff;
}

.genre-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.genre-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 45px;
    padding: 0 10px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
}

.genre-select-wrap span {
    color: #77738c;
    font-size: 10px;
    font-weight: 700;
}

.genre-select-wrap select {
    max-width: 130px;
    color: #eeeaf8;
    background: transparent;
    border: 0;
    outline: none;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
}

.genre-select-wrap select option {
    color: #fff;
    background: #151322;
}

.genre-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    padding: 0 13px;
    color: #bca9d8;
    background: rgba(168,85,247,.09);
    border: 1px solid rgba(168,85,247,.18);
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    transition: .2s ease;
}

.genre-reset-btn:hover {
    color: #fff;
    background: #8b35f5;
    border-color: #8b35f5;
}

/* ACTIVE FILTERS */

.genre-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -5px 0 18px;
}

.genre-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: #d8c5fa;
    background: rgba(139,53,245,.12);
    border: 1px solid rgba(168,85,247,.2);
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
}

/* RESULT STATUS */

.genre-results-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 26px 0 17px;
}

.genre-results-label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #aaa5bd;
    font-size: 11px;
    font-weight: 600;
}

.genre-results-dot {
    width: 7px;
    height: 7px;
    background: #a855f7;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(168,85,247,.8);
}

.genre-page-indicator {
    color: #77738c;
    font-size: 10px;
}

/* GRID */

.genre-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 25px 18px;
    min-height: 100px;
    align-items: start;
}

.genre-grid .movie-card {
    min-width: 0;
}

/* LOADING */

.genre-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.genre-loader-spinner {
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border: 3px solid rgba(168,85,247,.16);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: cinevaGenreSpin .8s linear infinite;
}

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

.genre-loading h3 {
    margin: 0 0 7px;
    color: #f4efff;
    font-size: 15px;
}

.genre-loading p {
    margin: 0;
    color: #858097;
    font-size: 11px;
}

/* EMPTY / ERROR */

.genre-empty,
.genre-error {
    padding: 65px 20px;
    text-align: center;
    background: rgba(255,255,255,.025);
    border: 1px dashed rgba(255,255,255,.10);
    border-radius: 18px;
}

.genre-empty-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    color: #b77aff;
    background: rgba(139,53,245,.12);
    border: 1px solid rgba(168,85,247,.17);
    border-radius: 18px;
    font-size: 23px;
}

.genre-empty h3,
.genre-error h3 {
    margin: 0 0 9px;
    color: #f4efff;
    font-size: 18px;
}

.genre-empty p,
.genre-error p {
    max-width: 430px;
    margin: 0 auto 20px;
    color: #918ca4;
    font-size: 12px;
    line-height: 1.8;
}

.genre-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 17px;
    color: #fff;
    background: linear-gradient(110deg, #8b35f5, #a855f7);
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
}

/* PAGINATION */

.genre-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 42px;
}

.genre-pagination:empty {
    display: none;
}

.genre-page-btn {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
    color: #aaa5bd;
    background: #121120;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    transition: .2s ease;
}

.genre-page-btn:hover:not(:disabled),
.genre-page-btn.active {
    color: #fff;
    background: #8b35f5;
    border-color: #8b35f5;
}

.genre-page-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.genre-page-dots {
    color: #77738c;
    padding: 0 3px;
}

/* ACCESSIBILITY */

.genre-page button:focus-visible,
.genre-page input:focus-visible,
.genre-page select:focus-visible,
.genre-page a:focus-visible {
    outline: 2px solid #b77aff;
    outline-offset: 3px;
}

/* RESPONSIVE */

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

@media (max-width: 850px) {
    .genre-hero {
        padding-top: 115px;
    }

    .genre-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .genre-search-field {
        width: 100%;
    }

    .genre-toolbar-controls {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
    }

    .genre-select-wrap {
        justify-content: space-between;
    }

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

@media (max-width: 600px) {
    .genre-hero {
        padding: 105px 0 42px;
    }

    .genre-hero-copy h1 {
        font-size: 39px;
        letter-spacing: -1.5px;
    }

    .genre-hero-copy p {
        font-size: 12px;
    }

    .genre-hero-stats {
        gap: 8px;
    }

    .genre-stat {
        padding: 9px 11px;
        font-size: 9px;
    }

    .genre-content-section {
        padding-top: 42px;
        padding-bottom: 65px;
    }

    .genre-section-heading {
        align-items: flex-start;
    }

    .genre-result-counter {
        gap: 6px;
        padding: 9px;
    }

    .genre-result-counter strong {
        font-size: 17px;
    }

    .genre-result-counter span {
        font-size: 8px;
    }

    .genre-toolbar {
        padding: 10px;
        border-radius: 13px;
    }

    .genre-toolbar-controls {
        grid-template-columns: 1fr 1fr;
    }

    .genre-select-wrap {
        gap: 5px;
        padding: 0 8px;
    }

    .genre-select-wrap span {
        font-size: 9px;
    }

    .genre-select-wrap select {
        max-width: 100px;
        font-size: 9px;
    }

    .genre-reset-btn {
        grid-column: 1 / -1;
        min-height: 38px;
    }

    .genre-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 11px;
    }

    .genre-results-top {
        margin-top: 20px;
    }

    .genre-page-btn {
        min-width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .genre-page *,
    .genre-page *::before,
    .genre-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.genre-hero-inner {
    position: relative;
}

/* Genre back navigation */
.genre-hero-actions { display:flex; justify-content:flex-start; margin:0 0 18px; }
.genre-back-button {
    display:inline-flex; align-items:center; justify-content:center; gap:9px;
    min-height:40px; padding:0 15px; border-radius:11px;
    color:#eee8ff; background:rgba(255,255,255,.055);
    border:1px solid rgba(192,132,252,.25); font-size:12px; font-weight:800;
    cursor:pointer; transition:all .2s ease;
}
.genre-back-button:hover { background:rgba(139,53,245,.2); border-color:#a855f7; transform:translateX(-2px); }
.genre-back-button i { color:#c084fc; }
@media(max-width:600px) { .genre-hero-actions { margin-bottom:14px; } .genre-back-button { min-height:38px; padding:0 13px; } }


/* =========================================================
   CINEVA — MEDIUM DISCOVERY CARDS
   Keep View All, Genre and Series grids aligned with the
   compact poster-card scale used across the catalogue.
   The homepage layout is intentionally not affected.
========================================================= */
.genre-page .genre-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 22px 18px;
}

.genre-page .genre-grid > .movie-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    align-self: stretch;
}

.genre-page .genre-grid > .movie-card .movie-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
}

.genre-page .genre-grid > .movie-card .movie-info {
    min-height: 88px;
    padding: 12px 11px 13px;
}

.genre-page .genre-grid > .movie-card .movie-info h3 {
    min-height: 39px;
    max-height: 39px;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .genre-page .genre-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 19px 15px;
    }
}

@media (max-width: 850px) {
    .genre-page .genre-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 17px 13px;
    }
}

@media (max-width: 600px) {
    .genre-page .genre-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px 10px;
    }

    .genre-page .genre-grid > .movie-card .movie-info {
        min-height: 76px;
        padding: 9px 8px 10px;
    }

    .genre-page .genre-grid > .movie-card .movie-info h3 {
        min-height: 34px;
        max-height: 34px;
        font-size: 11px;
        line-height: 1.5;
    }

    .genre-page .genre-grid > .movie-card .movie-meta {
        margin-top: 5px;
        font-size: 9px;
    }
}

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


/* =========================================================
   GENRE CARD ELEMENTS — MATCH THE SHARED HOME CARD LANGUAGE
   The genre renderer uses dedicated class names, so mirror
   the same badge and hover treatment without changing its JS.
========================================================= */
.genre-page .genre-grid .movie-card-link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.genre-page .genre-grid .movie-type-badge {
    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,.15);
    border-radius: 5px;
    background: rgba(10,10,20,.84);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.genre-page .genre-grid .movie-new-episode-badge {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 4;
    padding: 5px 8px;
    border: 1px solid rgba(52,211,153,.35);
    border-radius: 6px;
    background: rgba(5,35,28,.9);
    color: #6ee7b7;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .6px;
}

.genre-page .genre-grid .movie-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5,5,15,.55);
    opacity: 0;
    transition: opacity .3s ease;
}

.genre-page .genre-grid .movie-card:hover .movie-card-overlay,
.genre-page .genre-grid .movie-card:focus-within .movie-card-overlay {
    opacity: 1;
}

.genre-page .genre-grid .movie-play-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg,#8b35f5,#ef315e));
    color: #fff;
    font-size: 16px;
    box-shadow: 0 8px 25px rgba(139,53,245,.4);
    transform: scale(.75);
    transition: transform .3s ease;
}

.genre-page .genre-grid .movie-card:hover .movie-play-icon,
.genre-page .genre-grid .movie-card:focus-within .movie-play-icon {
    transform: scale(1);
}

@media (hover: none), (pointer: coarse) {
    .genre-page .genre-grid .movie-card-overlay {
        display: none;
    }
}
