/* ==========================================================================
   Eprendy Premium Video Player (Estilo Vimeo / Wistia / Netflix)
   ========================================================================== */

.eprendy-player-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0b090f;
    border-radius: 16px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.eprendy-player-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

/* Big Center Play/Pause Indicator (Vimeo Pulse Style) */
.eprendy-big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(42, 36, 51, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 80, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 38px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease, background 0.25s ease;
    z-index: 20;
    pointer-events: auto;
}

.eprendy-big-play i {
    margin-left: 4px;
}

.eprendy-big-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: linear-gradient(135deg, #FF5000, #FF7A00);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 35px rgba(255, 80, 0, 0.6);
}

.eprendy-big-play.eprendy-hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    pointer-events: none;
}

/* Controls Gradient Overlay */
.eprendy-controls-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
    z-index: 30;
    background: linear-gradient(to bottom, rgba(15, 12, 20, 0.65) 0%, transparent 25%, transparent 70%, rgba(15, 12, 20, 0.88) 100%);
}

.eprendy-player-wrapper.is-inactive.is-playing .eprendy-controls-overlay {
    opacity: 0;
    cursor: none;
}

.eprendy-player-wrapper.is-inactive.is-playing video {
    cursor: none;
}

/* Header Info Bar inside Player */
.eprendy-player-header {
    padding: 18px 24px;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eprendy-player-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eprendy-brand-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 80, 0, 0.3), rgba(255, 188, 0, 0.3));
    border: 1px solid rgba(255, 188, 0, 0.4);
    color: #FFBC00;
    backdrop-filter: blur(4px);
}

/* Controls Bottom Bar */
.eprendy-controls-bottom {
    padding: 0 20px 16px 20px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Progress Scrubber Container */
.eprendy-scrubber-container {
    position: relative;
    width: 100%;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.eprendy-scrubber-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 9999px;
    transition: height 0.15s ease;
    overflow: visible;
}

.eprendy-scrubber-container:hover .eprendy-scrubber-track {
    height: 7px;
}

.eprendy-scrubber-buffered {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
    pointer-events: none;
    transition: width 0.2s ease;
}

.eprendy-scrubber-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #FF5000, #FF7A00, #FFBC00);
    border-radius: 9999px;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(255, 80, 0, 0.8);
}

.eprendy-scrubber-handle {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 2px #FF5000;
    transition: transform 0.15s ease;
    pointer-events: none;
}

.eprendy-scrubber-container:hover .eprendy-scrubber-handle {
    transform: translateY(-50%) scale(1);
}

/* Time Tooltip on Hover */
.eprendy-scrubber-tooltip {
    position: absolute;
    bottom: 18px;
    transform: translateX(-50%);
    background: rgba(20, 16, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.eprendy-scrubber-container:hover .eprendy-scrubber-tooltip {
    opacity: 1;
}

/* Buttons Row */
.eprendy-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.eprendy-controls-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Player Button Generic */
.eprendy-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    outline: none;
}

.eprendy-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

.eprendy-btn:active {
    transform: scale(0.95);
}

/* Time Display */
.eprendy-time {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

.eprendy-time-divider {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 4px;
}

/* Volume Slider */
.eprendy-volume-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.eprendy-volume-slider-wrap {
    width: 0;
    overflow: hidden;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.eprendy-volume-container:hover .eprendy-volume-slider-wrap {
    width: 70px;
    margin-right: 6px;
}

.eprendy-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    cursor: pointer;
}

.eprendy-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease;
}

.eprendy-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* Speed Selector Menu */
.eprendy-speed-wrap {
    position: relative;
}

.eprendy-speed-btn {
    font-size: 12px;
    font-weight: 700;
    width: auto;
    padding: 0 10px;
    letter-spacing: 0.5px;
}

.eprendy-speed-menu {
    position: absolute;
    bottom: 45px;
    right: -10px;
    background: rgba(26, 20, 34, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 50;
    min-width: 80px;
}

.eprendy-speed-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.eprendy-speed-opt {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.eprendy-speed-opt:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.eprendy-speed-opt.is-active {
    background: linear-gradient(135deg, #FF5000, #FF7A00);
    color: #fff;
    font-weight: 800;
}

/* Loading Buffering Spinner */
.eprendy-buffering-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: #FF5000;
    border-radius: 50%;
    animation: eprendy-spin 0.8s linear infinite;
    pointer-events: none;
    z-index: 25;
    display: none;
}

.eprendy-buffering-spinner.is-buffering {
    display: block;
}

@keyframes eprendy-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Watermark */
.video-watermark {
    position: absolute;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    pointer-events: none;
    z-index: 15;
    user-select: none;
    -webkit-user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Resume Toast Notification */
.eprendy-player-toast {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(20, 16, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 80, 0, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 80, 0, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.eprendy-player-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
