/* CelebMasta Player — End Screen */
.cmvp-endscreen {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow: hidden;
}
.cmvp-endscreen.cmvp-es-visible {
    opacity: 1;
    pointer-events: all;
}

/* Header */
.cmvp-es-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-shrink: 0;
}
.cmvp-es-title {
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}
.cmvp-es-replay {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-family: Montserrat, sans-serif;
    padding: 3px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}
.cmvp-es-replay:hover { background: rgba(255,255,255,0.25); }

/* Autoplay bar */
.cmvp-es-autoplay {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.cmvp-es-autoplay.cmvp-es-ap-active { display: flex; }
.cmvp-es-ap-text {
    color: rgba(255,255,255,0.8);
    font-size: 10px;
    font-family: Montserrat, sans-serif;
    white-space: nowrap;
}
.cmvp-es-ap-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}
.cmvp-es-ap-progress {
    height: 100%;
    background: #EB03B3;
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
    transition: transform linear;
}
.cmvp-es-ap-cancel {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.cmvp-es-ap-cancel:hover { color: #fff; }

/* Video grid */
.cmvp-es-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    flex: 1;
    overflow: hidden;
    align-content: start;
    min-height: 0;
}

/* Card — title overlays image at bottom */
.cmvp-es-card {
    display: block;
    text-decoration: none;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    background: #111;
    line-height: 0;
}
.cmvp-es-card:hover .cmvp-es-thumb { opacity: 0.75; }
.cmvp-es-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s;
}

/* Duration — top right */
.cmvp-es-dur {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 2px;
    font-family: Montserrat, sans-serif;
    line-height: 1.4;
}

/* Title — absolute overlay at bottom of card */
.cmvp-es-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 9px;
    font-weight: 600;
    padding: 12px 5px 4px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

/* Mobile — 2 columns, tighter */
@media (max-width: 600px) {
    .cmvp-endscreen { padding: 8px; }
    .cmvp-es-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
    .cmvp-es-title { font-size: 11px; }
    .cmvp-es-header { margin-bottom: 6px; }
    .cmvp-es-card-title { font-size: 8px; padding: 10px 4px 3px; }
    .cmvp-es-dur { font-size: 8px; }
}

/* Loading state */
.cmvp-es-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    padding: 20px;
}
