/* ============================================
   ECHO24X7 CINEPLEX — cineplex.css v1.0.0
   Prefix  : ecx-
   Depends : echo24x7-font-awesome-6
   Player UI mirrors live-tv.css (prefix elt-)
   ============================================ */

:root {
    --ecx-bg:        #111111;
    --ecx-surface:   #2b2b2b;
    --ecx-surface-2: #242424;
    --ecx-accent:    #ef8200;
    --ecx-teal:      #4BBFC4;
    --ecx-text:      #f0f0f0;
    --ecx-muted:     #888888;
    --ecx-border:    #2e2e2e;
    --ecx-radius:    14px;
}


/* ============================================
   WRAPPER
   ============================================ */

.ecx-wrapper {
    background:    var(--ecx-bg);
    border-radius: var(--ecx-radius);
    overflow:      hidden;
    font-family:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color:         var(--ecx-text);
    max-width:     100%;
    box-shadow:    0 4px 24px rgba(0, 0, 0, 0.55);
}


/* ============================================
   PLAYER SECTION
   ============================================ */

.ecx-player-section {
    position:   relative;
    background: #000;
    width:      100%;
}

.ecx-player-container {
    position:     relative;
    width:        100%;
    aspect-ratio: 16 / 9;
    background:   #000;
    overflow:     hidden;
}

/*
 * YouTube IFrame API replaces <div id="ecx-player"> with <iframe id="ecx-player">,
 * keeping the same ID. So #ecx-player IS the iframe — style it directly.
 * Do NOT use "#ecx-player iframe" — that selector would match nothing.
 */
#ecx-player {
    position: absolute;
    inset:    0;
    width:    100%;
    height:   100%;
    z-index:  1;
    border:   none;
    display:  block;
}


/* ---- Play / Pause Overlay ---- */

.ecx-play-overlay {
    position:            absolute;
    inset:               0;
    z-index:             2;
    display:             flex;
    flex-direction:      column;
    align-items:         center;
    justify-content:     center;
    gap:                 14px;
    background-size:     cover;
    background-position: center;
    overflow:            hidden;
    cursor:              pointer;
    transition:          opacity 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    outline:             none;
}

/* Dark veil over the thumbnail — keeps YouTube native UI fully hidden */
.ecx-play-overlay::before {
    content:         '';
    position:        absolute;
    inset:           0;
    background:      rgba(0, 0, 0, 0.58);
    pointer-events:  none;
    z-index:         0;
}

.ecx-play-overlay.playing {
    opacity:         0;
    pointer-events:  none;
}

.ecx-play-overlay:hover .ecx-play-circle,
.ecx-play-overlay:focus-visible .ecx-play-circle {
    transform:  scale(1.1);
    background: var(--ecx-accent);
    box-shadow: 0 0 0 6px rgba(239, 130, 0, 0.25), 0 8px 32px rgba(239, 130, 0, 0.35);
}

.ecx-play-circle {
    position:        relative; /* above ::before veil */
    z-index:         1;
    width:           72px;
    height:          72px;
    border-radius:   50%;
    background:      rgba(239, 130, 0, 0.88);
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow:      0 4px 20px rgba(0, 0, 0, 0.5);
    flex-shrink:     0;
}

.ecx-play-circle i {
    font-size:   26px;
    color:       #fff;
    margin-left: 3px; /* optical centre for play icon */
}

/* Replay icon — no offset needed */
.ecx-play-circle i.fa-arrows-rotate {
    margin-left: 0;
}

.ecx-overlay-label {
    position:       relative; /* above ::before veil */
    z-index:        1;
    font-size:      12px;
    font-weight:    600;
    color:          rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow:    0 1px 4px rgba(0, 0, 0, 0.8);
}

.ecx-overlay-label.hidden { display: none; }


/* ---- Loading Spinner ---- */

.ecx-spinner {
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      rgba(0, 0, 0, 0.65);
    z-index:         10;
    transition:      opacity 0.3s ease;
}

.ecx-spinner.hidden {
    opacity:        0;
    pointer-events: none;
}

.ecx-spinner-ring {
    width:             48px;
    height:            48px;
    border:            4px solid rgba(255, 255, 255, 0.1);
    border-top-color:  var(--ecx-accent);
    border-radius:     50%;
    animation:         ecx-spin 0.75s linear infinite;
}

@keyframes ecx-spin { to { transform: rotate(360deg); } }


/* ---- Unavailable State ---- */

.ecx-unavailable {
    position:        absolute;
    inset:           0;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             14px;
    background:      #000;
    z-index:         6;
    color:           var(--ecx-muted);
}

.ecx-unavailable.hidden { display: none; }

.ecx-unavailable i { font-size: 42px; color: #c0392b; }
.ecx-unavailable p { font-size: 14px; margin: 0; color: var(--ecx-muted); }


/* ============================================
   FULLSCREEN
   ============================================ */

.ecx-player-section:fullscreen,
.ecx-player-section:-webkit-full-screen {
    display:        flex;
    flex-direction: column;
    background:     #000;
    width:          100vw;
    height:         100vh;
}

.ecx-player-section:fullscreen .ecx-player-container,
.ecx-player-section:-webkit-full-screen .ecx-player-container {
    flex:         1;
    aspect-ratio: unset;
}

/* Bar fades out when idle in fullscreen */
.ecx-player-section:fullscreen .ecx-now-playing-bar,
.ecx-player-section:-webkit-full-screen .ecx-now-playing-bar {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ecx-player-section:fullscreen .ecx-now-playing-bar.bar-hidden,
.ecx-player-section:-webkit-full-screen .ecx-now-playing-bar.bar-hidden {
    opacity:        0;
    visibility:     hidden;
    pointer-events: none;
}


/* ============================================
   NOW PLAYING BAR
   ============================================ */

.ecx-now-playing-bar {
    display:        flex;
    flex-direction: column;
    background:     var(--ecx-surface);
    border-top:     1px solid var(--ecx-border);
}

/* ---- Seekbar row: time / track / time ---- */

.ecx-seekbar-row {
    display:     none; /* shown only while is-playing class is present */
    align-items: center;
    gap:         8px;
    padding:     10px 14px 4px;
}

.ecx-now-playing-bar.is-playing .ecx-seekbar-row {
    display: flex;
}

/* ---- Info + Controls row ---- */

.ecx-bar-bottom {
    display:         flex;
    flex-wrap:       nowrap;
    align-items:     center;
    justify-content: space-between;
    padding:         5px 16px 10px;
    gap:             12px;
    min-height:      44px;
}

.ecx-now-playing-info {
    display:     flex;
    align-items: center;
    gap:         10px;
    min-width:   0;
    flex:        1;
}

/* ---- FILM Badge ---- */

.ecx-film-badge {
    display:        inline-flex;
    align-items:    center;
    gap:            5px;
    background:     var(--ecx-accent);
    color:          #fff;
    font-size:      9px;
    font-weight:    800;
    letter-spacing: 1.2px;
    padding:        3px 8px;
    border-radius:  4px;
    flex-shrink:    0;
    text-transform: uppercase;
}

/* ---- Now Playing Name & Desc ---- */

.ecx-now-playing-name {
    font-size:     13px;
    font-weight:   600;
    color:         var(--ecx-text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.ecx-now-playing-desc {
    font-size:     11px;
    color:         var(--ecx-muted);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

/* ---- Control Buttons ---- */

.ecx-player-controls {
    display:     flex;
    align-items: center;
    gap:         2px;
    flex-shrink: 0;
}

.ecx-ctrl-btn {
    background:    none;
    border:        none;
    color:         var(--ecx-muted);
    font-size:     17px;
    cursor:        pointer;
    padding:       7px 9px;
    border-radius: 7px;
    line-height:   1;
    transition:    color 0.18s ease, background 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
}

.ecx-ctrl-btn:hover { color: var(--ecx-text); background: var(--ecx-surface-2); }
.ecx-ctrl-btn.muted { color: var(--ecx-accent); }


/* ---- Seekbar Track / Fill / Thumb ---- */

.ecx-seekbar-track {
    flex:          1;
    height:        5px;
    background:    rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    position:      relative;
    cursor:        pointer;
    transition:    height 0.12s ease;
    outline:       none;
}

.ecx-seekbar-track:hover,
.ecx-seekbar-track:focus-visible,
.ecx-seekbar-track.dragging { height: 7px; }

.ecx-seekbar-fill {
    position:       absolute;
    left:           0;
    top:            0;
    height:         100%;
    width:          0%;
    background:     var(--ecx-accent);
    border-radius:  4px;
    pointer-events: none;
}

.ecx-seekbar-thumb {
    position:       absolute;
    top:            50%;
    left:           0%;
    transform:      translate(-50%, -50%);
    width:          12px;
    height:         12px;
    border-radius:  50%;
    background:     var(--ecx-accent);
    pointer-events: none;
    opacity:        0;
    transition:     opacity 0.15s ease;
    box-shadow:     0 0 4px rgba(0, 0, 0, 0.4);
}

.ecx-seekbar-track:hover .ecx-seekbar-thumb,
.ecx-seekbar-track:focus-visible .ecx-seekbar-thumb,
.ecx-seekbar-track.dragging .ecx-seekbar-thumb { opacity: 1; }

.ecx-time-current,
.ecx-time-duration {
    font-size:            11px;
    color:                var(--ecx-muted);
    font-variant-numeric: tabular-nums;
    white-space:          nowrap;
    min-width:            32px;
    text-align:           center;
}


/* ============================================
   MOVIE METADATA
   ============================================ */

.ecx-movie-meta {
    padding:    22px 20px 18px;
    background: var(--ecx-surface-2);
    border-top: 1px solid var(--ecx-border);
}

.ecx-title {
    font-size:      28px;
    font-weight:    800;
    color:          var(--ecx-text);
    margin:         0 0 14px;
    letter-spacing: 1px;
    text-transform: capitalize;
    line-height:    1.15;
}

/* ---- Year / Language / Curated Badges ---- */

.ecx-meta-badges {
    display:       flex;
    flex-wrap:     wrap;
    gap:           8px;
    margin-bottom: 14px;
}

.ecx-badge {
    display:        inline-flex;
    align-items:    center;
    gap:            5px;
    background:     rgba(255, 255, 255, 0.06);
    border:         1px solid var(--ecx-border);
    color:          var(--ecx-muted);
    font-size:      11px;
    font-weight:    600;
    padding:        4px 10px;
    border-radius:  20px;
    letter-spacing: 0.3px;
}

.ecx-badge-curated {
    background:   rgba(239, 130, 0, 0.12);
    border-color: rgba(239, 130, 0, 0.4);
    color:        var(--ecx-accent);
}

/* ---- Genre / Runtime Pills ---- */

.ecx-meta-pills {
    display:       flex;
    flex-wrap:     wrap;
    gap:           8px;
    margin-bottom: 18px;
}

.ecx-pill {
    display:        inline-flex;
    align-items:    center;
    gap:            5px;
    background:     rgba(75, 191, 196, 0.08);
    border:         1px solid rgba(75, 191, 196, 0.22);
    color:          var(--ecx-teal);
    font-size:      11px;
    font-weight:    500;
    padding:        4px 10px;
    border-radius:  6px;
    letter-spacing: 0.2px;
}

/* ---- Tagline ---- */

.ecx-tagline {
    font-size:   13px;
    font-style:  italic;
    color:       var(--ecx-muted);
    margin:      0;
    line-height: 1.6;
    text-align: center;
    padding-top: 10px
}

.ecx-tagline .fa-quote-left,
.ecx-tagline .fa-quote-right {
    font-size: 10px;
    color:     var(--ecx-accent);
    opacity:   0.8;
}


/* ============================================
   CRITIC'S NOTE SECTION
   ============================================ */

.ecx-section-divider {
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         20px 20px 0;
    background:      var(--ecx-bg);
}

.ecx-section-divider span {
    display:        inline-flex;
    align-items:    center;
    gap:            8px;
    font-size:      10px;
    font-weight:    700;
    letter-spacing: 2px;
    color:          var(--ecx-accent);
    text-transform: uppercase;
    padding:        6px 18px;
    border:         1px solid rgba(239, 130, 0, 0.3);
    border-radius:  20px;
    background:     rgba(239, 130, 0, 0.06);
}

.ecx-review {
    padding:    20px 20px 20px;
    background: var(--ecx-bg);
}

.ecx-review p {
    font-size:   14px;
    line-height: 1.85;
    color:       var(--ecx-teal);
    margin:      0 0 18px;
}

.ecx-review p:last-child {
    margin-bottom: 0;
}

/* ---- Hindi Text ---- */

.ecx-hindi {
    text-align:   center !important;
    font-style:   italic;
    font-size:    15px !important;
    line-height:  2 !important;
    padding:      14px 16px;
    border-left:  3px solid var(--ecx-accent);
    border-right: 3px solid var(--ecx-accent);
    background:   rgba(239, 130, 0, 0.05);
    border-radius: 4px;
    margin:        20px 0 !important;
    color:         var(--ecx-teal) !important;
}


/* ============================================
   REVIEWER CARD
   ============================================ */

.ecx-reviewer-card {
    display:     flex;
    align-items: center;
    gap:         14px;
    padding:     16px 20px 22px;
    background:  var(--ecx-surface-2);
    border-top:  1px solid var(--ecx-border);
}

.ecx-reviewer-avatar {
    width:        48px;
    height:       48px;
    border-radius: 50%;
    object-fit:   cover;
    flex-shrink:  0;
    box-shadow:   0 0 0 3px rgba(239, 130, 0, 0.25);
    display:      block;
}

.ecx-reviewer-info {
    display:        flex;
    flex-direction: column;
    gap:            3px;
    min-width:      0;
}

.ecx-reviewed-label {
    font-size:      9px;
    font-weight:    700;
    letter-spacing: 1.5px;
    color:          var(--ecx-accent);
    text-transform: uppercase;
    display:        inline-flex;
    align-items:    center;
    gap:            5px;
}

.ecx-reviewer-name {
    font-size:   15px;
    font-weight: 700;
    color:       var(--ecx-text);
    line-height: 1.2;
}

.ecx-reviewer-title {
    font-size: 12px;
    color:     var(--ecx-muted);
}


/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */

@media (max-width: 767px) {

    .ecx-title {
        font-size: 22px;
    }

    .ecx-now-playing-desc {
        display: none;
    }

    .ecx-play-circle {
        width:  60px;
        height: 60px;
    }

    .ecx-play-circle i {
        font-size: 22px;
    }

    .ecx-movie-meta,
    .ecx-review,
    .ecx-reviewer-card,
    .ecx-section-divider {
        padding-left:  14px;
        padding-right: 14px;
    }

    .ecx-hindi {
        font-size: 14px !important;
    }
}


/* ============================================
   FEATURED FILM OF THE MONTH BANNER
   ============================================ */

.ecx-featured-banner {
    position:         relative;
    background:       #0a0a0a;
    overflow:         hidden;
    border-bottom:    1px solid var(--ecx-border);
}

/* Cinematic film-strip rows (top & bottom) */
.ecx-feat-strip {
    display:          flex;
    align-items:      center;
    justify-content:  flex-start;
    gap:              0;
    height:           20px;
    background:       rgba(239, 130, 0, 0.18);
    padding:          0 4px;
    overflow:         hidden;
}

.ecx-feat-strip--top  { border-bottom: 2px solid rgba(239, 130, 0, 0.35); }
.ecx-feat-strip--bottom { border-top:  2px solid rgba(239, 130, 0, 0.35); }

.ecx-feat-strip-hole {
    display:       inline-block;
    width:         22px;
    height:        11px;
    min-width:     22px;
    border-radius: 3px;
    background:    rgba(0, 0, 0, 0.55);
    border:        1px solid rgba(239, 130, 0, 0.2);
    margin:        0 5px;
    flex-shrink:   0;
}

/* Main body — two columns */
.ecx-feat-body {
    display:          flex;
    align-items:      center;
    justify-content:  center;
    gap:              0;
    padding:          22px 20px 22px;
    position:         relative;
    background:       #1e1912;
    border-top:       1px solid rgba(239, 130, 0, 0.18);
    border-bottom:    1px solid rgba(239, 130, 0, 0.18);
    margin-bottom:    12px;
}

/* ---- Ribbon band: Featured Film of the Month ---- */
.ecx-feat-ribbon {
    display:          flex;
    align-items:      center;
    justify-content:  center;
    gap:              10px;
    width:            100%;
    padding:          5px 0;
    margin-top:       12px;
    background:       linear-gradient(
                          90deg,
                          transparent                   0%,
                          rgba(239, 130, 0, 0.82)      12%,
                          rgba(239, 130, 0, 0.95)      50%,
                          rgba(239, 130, 0, 0.82)      88%,
                          transparent                  100%
                      );
    font-size:        10px;
    font-weight:      800;
    letter-spacing:   2.5px;
    text-transform:   uppercase;
    color:            #fff;
    text-shadow:      0 1px 4px rgba(0, 0, 0, 0.5);
    box-shadow:       0 3px 12px rgba(239, 130, 0, 0.25);
    position:         relative;
    z-index:          2;
}

/* fold triangles at each end */
.ecx-feat-ribbon::before,
.ecx-feat-ribbon::after {
    content:          '';
    position:         absolute;
    bottom:           -7px;
    width:            0;
    height:           0;
    border-style:     solid;
}
.ecx-feat-ribbon::before {
    left:             0;
    border-width:     7px 0 0 7px;
    border-color:     rgba(180, 80, 0, 0.6) transparent transparent transparent;
}
.ecx-feat-ribbon::after {
    right:            0;
    border-width:     7px 7px 0 0;
    border-color:     rgba(180, 80, 0, 0.6) transparent transparent transparent;
}

.ecx-feat-ribbon i {
    font-size:        10px;
    opacity:          0.85;
}

/* Subtle ambient glow behind the whole banner */
.ecx-feat-body::before {
    content:          '';
    position:         absolute;
    inset:            0;
    background:       radial-gradient(ellipse 80% 60% at 35% 50%, rgba(239,130,0,0.07) 0%, transparent 70%);
    pointer-events:   none;
}

/* ---- Left column: NOW SHOWING clapperboard badge ---- */
.ecx-feat-play-col {
    display:          flex;
    flex-direction:   column;
    align-items:      center;
    gap:              10px;
    flex-shrink:      0;
    margin-right:     22px;
    position:         relative;
    z-index:          1;
}

/* Clapperboard badge — decorative, non-interactive */
.ecx-feat-clap-badge {
    width:            64px;
    height:           64px;
    border-radius:    14px;
    background:       linear-gradient(160deg, #3d1500 0%, #1c0800 60%, #0d0400 100%);
    border:           2px solid #ef8200;
    display:          flex;
    align-items:      center;
    justify-content:  center;
    box-shadow:       0 0 32px rgba(239, 130, 0, 0.55),
                      0 0 10px rgba(239, 130, 0, 0.35),
                      inset 0 0 18px rgba(239, 130, 0, 0.12);
    position:         relative;
    flex-shrink:      0;
}

.ecx-feat-clap-badge img{
    padding: 2px;
}

/* Bold black + orange clapperboard stripe bar */
.ecx-feat-clap-badge::before {
    content:          '';
    position:         absolute;
    top:              0;
    left:             0;
    right:            0;
    height:           15px;
    border-radius:    11px 11px 0 0;
    
}

.ecx-feat-clap-badge i {
    font-size:        26px;
    color:            #ffffff;
    filter:           drop-shadow(0 0 6px rgba(239, 130, 0, 0.8));
    margin-top:       6px; /* clear the stripe */
}

/* "NOW SHOWING" label under the badge */
.ecx-feat-play-label {
    font-size:        9px;
    font-weight:      800;
    letter-spacing:   2px;
    color:            var(--ecx-accent);
    text-transform:   uppercase;
    white-space:      nowrap;
}

/* ---- Right column: text ---- */
.ecx-feat-text-col {
    display:          flex;
    flex-direction:   column;
    gap:              2px;
    min-width:        0;
    position:         relative;
    z-index:          1;
}

/* Month */
.ecx-feat-month {
    font-size:        13px;
    font-weight:      700;
    color:            rgba(239, 130, 0, 0.75);
    letter-spacing:   3px;
    text-transform:   uppercase;
    margin-top:       2px;
}

/* Main title — "Betrayal" */
.ecx-feat-title {
    font-size:        38px;
    font-weight:      900;
    color:            #ffffff;
    margin:           0;
    line-height:      1;
    letter-spacing:   -0.5px;
    text-shadow:      0 0 40px rgba(239,130,0,0.25), 0 2px 8px rgba(0,0,0,0.8);
    /* Subtle orange gradient on the text */
    background:       linear-gradient(175deg, #ffffff 55%, rgba(239,130,0,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tagline — "Oldest Human Trait" */
.ecx-feat-tagline {
    margin:           0;
    font-size:        12px;
    font-style:       italic;
    color:            var(--ecx-teal);
    letter-spacing:   0.5px;
    display:          flex;
    align-items:      center;
    gap:              7px;
    margin-top:       2px;
}

.ecx-feat-tagline i {
    font-size:  6px;
    color:      var(--ecx-accent);
    flex-shrink: 0;
}

/* Decorative vertical accent bar on far left of text col */
.ecx-feat-text-col::before {
    content:      '';
    position:     absolute;
    left:         -13px;
    top:          4px;
    bottom:       4px;
    width:        3px;
    border-radius: 2px;
    background:   linear-gradient(to bottom, var(--ecx-accent) 0%, transparent 100%);
}

/* Responsive */
@media (max-width: 767px) {

    .ecx-feat-title {
        font-size: 30px;
    }

    .ecx-feat-clap-badge {
        width:  65px;
        height: 65px;
        border-radius: 11px;
    }

    .ecx-feat-clap-badge i {
        font-size: 21px;
    }

    .ecx-feat-body {
        padding: 18px 16px 16px;
    }

    .ecx-feat-play-col {
        margin-right: 16px;
    }
}
