/* Header search box (site-topbar) */
.header-search {
    position: relative;
    flex: 1 1 260px;
    max-width: 360px;
    margin: 0 12px;
}

    .header-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255,255,255,.7);
        font-size: .9em;
    }

    .header-search input {
        width: 100%;
        box-sizing: border-box;
        padding: 8px 12px 8px 32px;
        border-radius: 20px;
        border: 1px solid rgba(255,255,255,.3);
        background: rgba(255,255,255,.12);
        color: #fff;
        font-size: .9em;
    }

        .header-search input::placeholder {
            color: rgba(255,255,255,.7);
        }

        .header-search input:focus {
            outline: none;
            background: rgba(255,255,255,.2);
            border-color: rgba(255,255,255,.6);
        }

@media (max-width: 900px) {
    .header-search {
        display: none;
    }
}

.movies-hero {
    background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 60%, var(--site-light) 100%);
    color: #fff;
    border-radius: 14px;
    padding: 40px 32px;
    text-align: center;
    margin-bottom: 24px;
}

    .movies-hero h1 {
        font-size: 1.9em;
        font-weight: 800;
        margin: 0 0 10px;
    }

    .movies-hero p {
        margin: 0;
        opacity: .92;
        font-size: 1.02em;
    }

.movie-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(20,22,31,.05);
}

    .movie-filter-bar .search-wrap {
        flex: 1 1 240px;
        position: relative;
    }

        .movie-filter-bar .search-wrap i {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
        }

    .movie-filter-bar input[type="text"] {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 14px 10px 36px;
        border: 1px solid #d7dbe1;
        border-radius: 8px;
        font-size: .95em;
    }

    .movie-filter-bar select {
        padding: 10px 14px;
        border: 1px solid #d7dbe1;
        border-radius: 8px;
        font-size: .95em;
        background: #fff;
    }

        .movie-filter-bar input:focus, .movie-filter-bar select:focus {
            outline: none;
            border-color: var(--site-dark);
        }

#movieResultCount {
    font-size: .88em;
    color: #6b7280;
    white-space: nowrap;
}

/* A-Z alphabet quick-filter widget */
.alpha-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(20,22,31,.05);
}

.alpha-btn {
    border: 1px solid #d7dbe1;
    background: #fff;
    color: #374151;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    font-size: .85em;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
}

    .alpha-btn:hover:not(:disabled) {
        border-color: var(--site-dark);
        color: var(--site-dark);
    }

    .alpha-btn.is-active {
        background: var(--site-dark);
        border-color: var(--site-dark);
        color: #fff;
    }

    .alpha-btn:disabled {
        opacity: .3;
        cursor: not-allowed;
    }

/* Ranked list (IMDb Top-Chart style): rank number, poster placeholder, info, rating - one row per movie */
.movie-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.movie-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 2px 10px rgba(20,22,31,.05);
    transition: box-shadow .2s ease, transform .2s ease;
    text-decoration: none;
    color: inherit;
}

    .movie-card:hover {
        box-shadow: 0 8px 20px rgba(20,22,31,.1);
        transform: translateY(-2px);
    }

    .movie-card.hide {
        display: none;
    }

.movie-rank {
    flex: 0 0 32px;
    font-size: 1.3em;
    font-weight: 800;
    color: var(--site-dark);
    text-align: center;
}

.movie-poster-placeholder {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--site-dark), var(--site-dark-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.movie-poster {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
}

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

.movie-card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.movie-card-head h3 {
    margin: 0;
    font-size: 1.05em;
    color: #23272f;
    display: inline;
}

.movie-list-year {
    font-weight: 400;
    color: #6b7280;
    font-size: .9em;
}

.movie-year-badge {
    background: var(--site-dark);
    color: #fff;
    font-size: .78em;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    flex-shrink: 0;
}

.movie-genre {
    font-size: .8em;
    color: var(--site-dark-2);
    font-weight: 600;
}

.movie-plot {
    font-size: .87em;
    color: #4b5563;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-rating {
    flex: 0 0 auto;
    color: var(--site-dark);
    font-weight: 700;
    font-size: .92em;
    white-space: nowrap;
}

    .movie-rating i {
        color: var(--site-gold, #f4c95d);
        margin-right: 3px;
    }

#movieSearchEmpty {
    text-align: center;
    color: #6b7280;
    padding: 40px 20px;
}

    #movieSearchEmpty.hide {
        display: none;
    }

/* Pagination (6 rows/page on the full list + every category page) */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d7dbe1;
    background: #fff;
    color: var(--site-dark);
    font-weight: 700;
    font-size: .9em;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s ease;
}

    .page-btn:hover:not(:disabled) {
        background: var(--site-dark);
        border-color: var(--site-dark);
        color: #fff;
    }

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

.page-status {
    font-size: .88em;
    color: #6b7280;
    white-space: nowrap;
}

/* Home page widget grids (Latest/Hollywood/Bollywood/Tollywood/Top 10/etc.) - square poster tiles,
   distinct from the horizontal ranked-list rows (.movie-grid/.movie-card) used on the full
   browse list and category pages. */
.movie-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
/* Two-row variant (Hollywood/Bollywood/Tollywood widgets) - movies-home.js measures the row's
   width to decide how many tiles fit per line, then renders exactly 2 lines worth (wrapping),
   never a partial/overflowing 3rd line. */
.movie-tile-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

    .movie-tile-row .movie-tile {
        flex: 0 0 230px;
    }
/* Every tile is the exact same box regardless of content - title length and whether a rating
   exists both used to change the card's total height, which looked broken next to a full row of
   others. .movie-tile-title reserves 2 lines' worth of height even for a 1-line title, and
   .movie-tile-rating always renders (movies-data.js emits a non-breaking space when there's no
   Rating) so its line is reserved too. */
.movie-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.movie-tile-poster {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20,22,31,.08);
    transition: transform .2s ease;
    background: #11151f;
    flex-shrink: 0;
}

.movie-tile:hover .movie-tile-poster {
    transform: translateY(-3px);
}
/* object-fit: contain (not cover) - a real poster keeps its own original proportions and
   letterboxes inside the fixed square box instead of being cropped/stretched to fill it. */
.movie-tile-poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.movie-tile-poster-placeholder {
    background: linear-gradient(135deg, var(--site-dark), var(--site-dark-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
}

.movie-tile-title {
    margin-top: 8px;
    font-size: .88em;
    font-weight: 700;
    color: #23272f;
    line-height: 1.2;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tile-rating {
    margin-top: 4px;
    font-size: .82em;
    font-weight: 700;
    color: var(--site-dark);
    min-height: 1.2em;
}

    .movie-tile-rating i {
        color: var(--site-gold, #f4c95d);
        margin-right: 3px;
    }

/* Home page "Latest Movies" widget + View All link */
.latest-movies-section {
    margin-bottom: 24px;
}

.latest-movies-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

    .latest-movies-head h2 {
        margin: 0;
        font-size: 1.3em;
    }

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--site-dark);
    color: #fff;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: .9em;
    transition: background .2s ease;
}

    .view-all-link:hover {
        background: var(--site-dark-2);
    }

/* Cross-promo banner/sidebar CSS moved to the shared content/assets/common.css (2026-09-17,
   "supported should be inside shared folder content/assets/") - no per-site duplicate here
   anymore, since the same banner now rolls out network-wide, not just on this site. */

/* Explore Now - single visual placeholder button (was two, "Watch Now"/"Download Now" -
   simplified 2026-09-17), no click behavior wired up yet beyond the scroll-to-bottom handler in
   movies-detail.js. Large and eye-catching per the original request; the play icon specifically
   gets its own white circular "video play button" badge with a soft pulsing ring, since a plain
   inline icon didn't read as clickable enough on its own. */
.movie-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 14px 0;
}

.bottom-action .movie-action-buttons {
    display: block;
    text-align: center;
}

.bottom-action .action-button {
    margin: 10px;
}

.movie-action-buttons .action-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.15em;
    padding: 8px 30px 8px 8px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
}

    .movie-action-buttons .action-button i {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        border-radius: 50%;
        background: #fff;
        font-size: 1.05em;
        padding-left: 3px;
        box-sizing: border-box;
        animation: explore-btn-pulse 1.8s ease-in-out infinite;
    }

.action-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 22px rgba(0,0,0,.3);
}

.explore-btn {
    background: linear-gradient(135deg, #ab931f, #7a6d0e);
}

    .explore-btn i {
        color: #7a570e;
    }

.download-btn {
    background: linear-gradient(135deg, #1fab5a, #0e7a3d);
}

    .download-btn i {
        color: #0e7a3d;
    }

@keyframes explore-btn-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255,255,255,.55);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255,255,255,0);
    }
}

/* Movie detail page */
.movie-detail-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(20,22,31,.05);
}

.movie-detail-top {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

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

.movie-detail-poster, .movie-detail-poster-placeholder {
    flex: 0 0 200px;
    width: 200px;
    height: 290px;
    border-radius: 10px;
    overflow: hidden;
}

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

.movie-detail-poster-placeholder {
    background: linear-gradient(135deg, var(--site-dark), var(--site-dark-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4em;
}

.movie-detail-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

    .movie-detail-head h1 {
        margin: 0;
        font-size: 1.6em;
    }

.movie-detail-rating {
    font-size: 1.1em;
    margin: 10px 0;
}

.movie-detail-plot {
    font-size: 1em;
    color: #374151;
    line-height: 1.6;
    margin: 16px 0;
}

.movie-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 18px;
}

    .movie-detail-meta > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .movie-detail-meta strong {
        font-size: .78em;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #9ca3af;
    }

    .movie-detail-meta span {
        font-size: .95em;
        color: #23272f;
    }

.back-to-browse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--site-dark);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 16px;
}

    .back-to-browse:hover {
        text-decoration: underline;
    }

#movieNotFound {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

@media (max-width: 600px) {
    .movie-tile-row .movie-tile {
        flex: 0 0 130px;
    }

    .movie-tile-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .movies-hero {
        padding: 28px 18px;
    }

        .movies-hero h1 {
            font-size: 1.5em;
        }

    .movie-card {
        flex-wrap: wrap;
    }

    .movie-plot {
        white-space: normal;
    }

    .movie-rating {
        flex-basis: 100%;
        text-align: right;
    }

    .alpha-btn {
        width: 28px;
        height: 28px;
        font-size: .78em;
    }

    .movie-detail-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .movie-detail-meta {
        text-align: left;
    }
    /* Larger poster once it's stacked full-width above the title instead of sitting beside it -
       the desktop size (200x290) looked small with all that extra width available. Scales with
       viewport width (capped) rather than a second fixed size, keeping the same 20:29 proportions
       as the desktop box above. */
    .movie-detail-poster, .movie-detail-poster-placeholder {
        flex: 0 0 auto;
        width: 65%;
        max-width: 280px;
        height: auto;
        aspect-ratio: 200 / 290;
    }
}
