/* ==========================================================================
   Professional Modern AnimeTV Video Player Theme (Refined & Bulletproof)
   ========================================================================== */

/* Remove any browser / Electron focus outlines completely */
.anime-player,
.anime-player *,
.video-js,
.video-js *,
.kamyabsoft-player,
.kamyabsoft-player *,
.video-js:focus,
.video-js *:focus,
.anime-player:focus,
.anime-player *:focus,
video:focus,
video-js:focus {
    outline: none !important;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent !important;
}

/* --------------------------------------------------------------------------
   Player Box: Exact 16:9 Aspect Ratio (No Excess Black Space!)
   -------------------------------------------------------------------------- */
.anime-player {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    max-height: 72vh !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    direction: ltr !important;
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7) !important;
    user-select: none;
}

.anime-player .kamyabsoft-player,
.video-js.kamyabsoft-player {
    width: 100% !important;
    height: 100% !important;
    padding-top: 0 !important; /* Critical: cancels out the old 56.25% padding hack */
    position: relative !important;
    background: #000000 !important;
    font-family: 'Kalame', 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.video-js .vjs-tech {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.vjs-poster img {
    object-fit: cover;
    filter: grayscale(0.5);
}

/* --------------------------------------------------------------------------
   Top Video Title HUD (Floating Glass Badge)
   -------------------------------------------------------------------------- */
.anime-player .video-title {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 64px !important;
    padding: 0 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    background: linear-gradient(180deg, rgba(6, 9, 15, 0.85) 0%, rgba(6, 9, 15, 0.35) 60%, transparent 100%) !important;
    z-index: 12 !important;
    pointer-events: none !important;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
}

.anime-player .video-title span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(14, 20, 32, 0.75) !important;
    backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    padding: 6px 16px !important;
    border-radius: 999px !important;
    color: #FFFFFF !important;
    font-family: 'Kalame', 'Vazirmatn', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

.anime-player .video-title span:after {
    content: "\f008";
    font-family: 'Font Awesome 6 Pro';
    color: #00E676;
    font-size: 13px;
    font-weight: 900;
}

.anime-player .kamyabsoft-player.vjs-user-active .video-title,
.anime-player .kamyabsoft-player.vjs-paused .video-title,
.anime-player:hover .video-title {
    opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   Big Play Button (Center of video)
   -------------------------------------------------------------------------- */
.video-js .vjs-big-play-button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: rgba(11, 17, 27, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    border: 2px solid rgba(0, 230, 118, 0.7) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 28px rgba(0, 230, 118, 0.32) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 15 !important;
}

.video-js .vjs-big-play-button:hover,
.video-js .vjs-big-play-button:focus {
    transform: translate(-50%, -50%) scale(1.1) !important;
    background: rgba(11, 17, 27, 0.95) !important;
    border-color: #00E676 !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.8), 0 0 38px rgba(0, 230, 118, 0.55) !important;
}

.video-js .vjs-big-play-button .vjs-icon-placeholder:before {
    content: "\f04b" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 26px !important;
    color: #00E676 !important;
    line-height: 1 !important;
    position: static !important;
    margin-left: 4px !important;
    top: auto !important;
    transform: none !important;
}

.vjs-controls-disabled .vjs-big-play-button,
.vjs-has-started .vjs-big-play-button,
.vjs-using-native-controls .vjs-big-play-button,
.vjs-error .vjs-big-play-button {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Control Bar Container: 2-Row Flex Layout
   Row 1: Full-Width Scrubber / Progress Bar
   Row 2: Control Buttons (Left Playback, Right Options)
   -------------------------------------------------------------------------- */
.kamyabsoft-player .vjs-control-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 18px 8px 18px !important;
    direction: ltr !important;
    background: linear-gradient(0deg, rgba(6, 9, 15, 0.96) 0%, rgba(6, 9, 15, 0.6) 60%, transparent 100%) !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.kamyabsoft-player.vjs-user-active .vjs-control-bar,
.kamyabsoft-player.vjs-paused .vjs-control-bar,
.anime-player:hover .vjs-control-bar {
    opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   Row 1: Full-Width Timeline Scrubber (ZERO Grey Hover Background)
   -------------------------------------------------------------------------- */
.kamyabsoft-player .vjs-progress-control {
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 18px !important;
    order: -1 !important; /* Row 1: Always above buttons */
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

.kamyabsoft-player .vjs-progress-control:hover,
.kamyabsoft-player .vjs-progress-control:focus {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

.kamyabsoft-player .vjs-progress-holder {
    height: 5px !important;
    width: 100% !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.28) !important;
    transition: height 0.18s ease !important;
    position: relative !important;
    margin: 0 !important;
}

.kamyabsoft-player .vjs-progress-control:hover .vjs-progress-holder {
    height: 7px !important;
}

.kamyabsoft-player .vjs-slider {
    background-color: transparent !important;
}

.kamyabsoft-player .vjs-load-progress,
.kamyabsoft-player .vjs-load-progress div {
    background: rgba(255, 255, 255, 0.35) !important;
    border-radius: 999px !important;
    height: 100% !important;
}

.kamyabsoft-player .vjs-play-progress {
    background: linear-gradient(90deg, #00C853, #00E676) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.6) !important;
    height: 100% !important;
    position: relative !important;
}

/* Scrub Handle Knob */
.kamyabsoft-player .vjs-play-progress:before {
    content: '' !important;
    position: absolute !important;
    right: -6px !important;
    top: 50% !important;
    transform: translateY(-50%) scale(0.6) !important;
    width: 13px !important;
    height: 13px !important;
    border-radius: 50% !important;
    background: #FFFFFF !important;
    border: 2.5px solid #00E676 !important;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.95), 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    opacity: 0;
    transition: opacity 0.18s, transform 0.18s ease !important;
    z-index: 5 !important;
}

.kamyabsoft-player .vjs-progress-control:hover .vjs-play-progress:before {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.15) !important;
}

/* Remove duplicate / redundant playback tooltip */
.video-js .vjs-play-progress .vjs-time-tooltip {
    display: none !important;
}

.kamyabsoft-player .vjs-time-tooltip {
    background: rgba(12, 17, 26, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 6px !important;
    color: #FFFFFF !important;
    font-family: 'Kalame', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    top: -30px !important;
}

/* --------------------------------------------------------------------------
   Row 2: Control Buttons (Zero Layout Shift on Hover!)
   -------------------------------------------------------------------------- */

/* Reset generic control backgrounds to prevent any stray bubbles */
.video-js .vjs-control,
.video-js .vjs-control:hover,
.video-js .vjs-time-control,
.video-js .vjs-time-control:hover,
.video-js .vjs-volume-panel,
.video-js .vjs-volume-panel:hover {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Individual button base */
.video-js .vjs-control-bar button.vjs-button,
.video-js .prev-player,
.video-js .next-player,
.video-js .lock-player,
.video-js .vjs-seek-button,
.video-js .vjs-prev-overlay,
.video-js .vjs-next-overlay {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    align-self: center !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 2px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important; /* Never scale container - prevents sibling jitter */
    transition: color 0.15s ease, background 0.15s ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.video-js .vjs-prev-overlay,
.video-js .vjs-next-overlay {
    position: relative !important;
    border-radius: 0 !important;
}

.video-js .vjs-control-bar button.vjs-button:hover,
.video-js .prev-player:hover,
.video-js .next-player:hover,
.video-js .lock-player:hover,
.video-js .vjs-seek-button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #00E676 !important;
    transform: none !important;
}

/* Play / Pause */
.vjs-icon-play:before,
.video-js .vjs-play-control .vjs-icon-placeholder:before {
    content: "\f04b" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.vjs-icon-pause:before,
.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before {
    content: "\f04c" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.vjs-icon-replay:before,
.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before {
    content: "\f2ea" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 17px !important;
    line-height: 1 !important;
}

/* Previous / Next Episode Buttons */
.anime-player .prev-player a,
.anime-player .next-player a {
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.15s ease !important;
}

.anime-player .prev-player a.clickable,
.anime-player .next-player a.clickable {
    color: rgba(255, 255, 255, 0.85) !important;
}

.anime-player .prev-player:hover a.clickable,
.anime-player .next-player:hover a.clickable {
    color: #00E676 !important;
}

/* Seek Buttons (15s back / 30s forward) */
.video-js .vjs-seek-button .vjs-icon-placeholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

.video-js .vjs-seek-button .vjs-icon-placeholder:before {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 15px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
    left: auto !important;
}

.video-js .vjs-seek-button.skip-back .vjs-icon-placeholder:before {
    content: "\f2ea" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    transform: none !important;
}

.video-js .vjs-seek-button.skip-forward .vjs-icon-placeholder:before {
    content: "\f2ea" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    transform: scaleX(-1) !important;
    transform-origin: center center !important;
}

/* Volume Panel: Speaker + Fixed Compact Slider (Zero Layout Shift) */
.video-js .vjs-volume-panel {
    display: inline-flex !important;
    align-items: center !important;
    height: 36px !important;
    margin: 0 4px !important;
    flex-shrink: 0 !important;
}

.video-js .vjs-volume-panel .vjs-mute-control {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.85) !important;
    background: transparent !important;
}

.video-js .vjs-volume-panel .vjs-mute-control:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #00E676 !important;
}

.video-js .vjs-volume-control.vjs-volume-horizontal {
    width: 55px !important;
    height: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 6px 0 2px !important;
}

.video-js .vjs-volume-bar.vjs-slider-horizontal {
    width: 100% !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    margin: 0 !important;
}

.video-js .vjs-volume-level {
    border-radius: 999px !important;
    background: linear-gradient(90deg, #00C853, #00E676) !important;
}

.video-js .vjs-volume-level:before {
    display: none !important;
}

.vjs-icon-volume-mute:before,
.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
    content: "\f2e2" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 16px !important;
}

.vjs-icon-volume-high:before,
.video-js .vjs-mute-control .vjs-icon-placeholder:before {
    content: "\f028" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 16px !important;
}

.vjs-icon-volume-mid:before,
.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {
    content: "\f6a8" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 16px !important;
}

.vjs-icon-volume-low:before,
.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {
    content: "\f027" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 16px !important;
}

/* Time Displays (Clean 04:21 / 25:42) */
.video-js .vjs-time-control {
    display: inline-flex !important;
    align-items: center !important;
    height: 36px !important;
    padding: 0 1px !important;
    margin: 0 !important;
    font-family: 'Kalame', 'Vazirmatn', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.82) !important;
    line-height: 1 !important;
    background: transparent !important;
    flex-shrink: 0 !important;
}

.video-js .vjs-current-time-display,
.video-js .vjs-duration-display {
    font-family: 'Kalame', 'Vazirmatn', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    direction: ltr !important;
}

.video-js .vjs-time-divider {
    padding: 0 3px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    min-width: 0 !important;
}

.video-js .vjs-remaining-time {
    display: none !important; /* Hide redundant remaining time */
}

/* Spacer: pushes Quality, Speed, Lock, Fullscreen to right edge */
.video-js .vjs-custom-control-spacer {
    display: block !important;
    flex: 1 1 auto !important;
}

/* Quality Badge */
.video-js .quality-player {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 4px !important;
    flex-shrink: 0 !important;
}

.video-js .quality-player > p {
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #FFFFFF !important;
    font-family: 'Kalame', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
}

.video-js .quality-player > p:hover {
    background: rgba(0, 230, 118, 0.2) !important;
    border-color: #00E676 !important;
    color: #00E676 !important;
}

/* Playback Rate / Speed (1x) Button Container */
.video-js div.vjs-playback-rate {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.85) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 4px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.video-js div.vjs-playback-rate:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #00E676 !important;
}

/* Neutralize the inner button so it never renders as a duplicate circle */
.video-js div.vjs-playback-rate button.vjs-playback-rate,
.video-js div.vjs-playback-rate button.vjs-menu-button {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 1 !important;
    opacity: 0 !important;
}

/* Hover bridge upward from button towards menu */
.video-js div.vjs-playback-rate::after {
    content: '';
    position: absolute;
    top: -16px;
    left: -6px;
    right: -6px;
    height: 24px;
    background: transparent;
    pointer-events: auto;
    z-index: 2;
}

.video-js div.vjs-playback-rate .vjs-playback-rate-value {
    font-family: 'Kalame', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: inherit !important;
    text-align: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 0 !important;
}

.video-js div.vjs-playback-rate .vjs-menu {
    position: absolute !important;
    bottom: 42px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 80px !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 100 !important;
}

/* Hover bridge downward from menu into button */
.video-js div.vjs-playback-rate .vjs-menu::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: -10px;
    right: -10px;
    height: 24px;
    background: transparent;
    pointer-events: auto;
}

.video-js div.vjs-playback-rate:hover .vjs-menu,
.video-js div.vjs-playback-rate.vjs-hover .vjs-menu,
.video-js div.vjs-playback-rate .vjs-menu:hover,
.video-js div.vjs-playback-rate .vjs-menu.vjs-lock-showing {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.video-js div.vjs-playback-rate .vjs-menu .vjs-menu-content {
    background: rgba(14, 20, 32, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-radius: 10px !important;
    padding: 6px 0 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 16px rgba(0, 230, 118, 0.25) !important;
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 80px !important;
    max-height: 240px !important;
}

.video-js div.vjs-playback-rate .vjs-menu-item {
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 10px !important;
    color: #e5e7eb !important;
    text-align: center !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    margin: 2px 4px !important;
}

.video-js div.vjs-playback-rate .vjs-menu-item:hover {
    background: rgba(0, 230, 118, 0.2) !important;
    color: #00E676 !important;
}

.video-js div.vjs-playback-rate .vjs-menu-item.vjs-selected {
    background: #00E676 !important;
    color: #000 !important;
    font-weight: 700 !important;
}

/* Ensure control bar remains visible while interacting with the speed menu */
.video-js .vjs-control-bar:has(div.vjs-playback-rate:hover),
.video-js .vjs-control-bar:has(.vjs-menu:hover),
.video-js.vjs-user-inactive .vjs-control-bar:has(div.vjs-playback-rate:hover),
.video-js.vjs-user-inactive .vjs-control-bar:has(.vjs-menu:hover) {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Lock Button */
.video-js .lock-player {
    flex-shrink: 0 !important;
}

.video-js .lock-player a {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Fullscreen Button */
.vjs-icon-fullscreen-enter:before,
.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {
    content: "\f065" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-size: 16px !important;
}

/* --------------------------------------------------------------------------
   Locked State Styling
   -------------------------------------------------------------------------- */
.anime-player.lock .vjs-progress-control,
.anime-player.lock .vjs-seek-button,
.anime-player.lock .vjs-play-control,
.anime-player.lock .vjs-mute-control,
.anime-player.lock .quality-player,
.anime-player.lock .vjs-time-control,
.anime-player.lock .vjs-fullscreen-control,
.anime-player.lock .video-title,
.anime-player.lock .prev-player,
.anime-player.lock .next-player,
.anime-player.lock .vjs-volume-panel,
.anime-player.lock .vjs-playback-rate,
.anime-player.lock .vjs-prev-overlay,
.anime-player.lock .vjs-next-overlay,
.anime-player.lock .vjs-custom-control-spacer,
.trailer-player.lock .vjs-progress-control,
.trailer-player.lock .vjs-seek-button,
.trailer-player.lock .vjs-play-control,
.trailer-player.lock .vjs-mute-control,
.trailer-player.lock .quality-player,
.trailer-player.lock .vjs-time-control,
.trailer-player.lock .vjs-fullscreen-control,
.trailer-player.lock .video-title,
.trailer-player.lock .prev-player,
.trailer-player.lock .next-player,
.trailer-player.lock .vjs-volume-panel,
.trailer-player.lock .vjs-playback-rate,
.trailer-player.lock .vjs-prev-overlay,
.trailer-player.lock .vjs-next-overlay,
.trailer-player.lock .vjs-custom-control-spacer,
.vjs-player-locked .vjs-progress-control,
.vjs-player-locked .vjs-seek-button,
.vjs-player-locked .vjs-play-control,
.vjs-player-locked .vjs-mute-control,
.vjs-player-locked .quality-player,
.vjs-player-locked .vjs-time-control,
.vjs-player-locked .vjs-fullscreen-control,
.vjs-player-locked .video-title,
.vjs-player-locked .prev-player,
.vjs-player-locked .next-player,
.vjs-player-locked .vjs-volume-panel,
.vjs-player-locked .vjs-playback-rate,
.vjs-player-locked .vjs-prev-overlay,
.vjs-player-locked .vjs-next-overlay,
.vjs-player-locked .vjs-custom-control-spacer {
    display: none !important;
}

.anime-player.lock .vjs-control-bar,
.trailer-player.lock .vjs-control-bar,
.vjs-player-locked .vjs-control-bar {
    background: transparent !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    pointer-events: none !important;
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
}

.anime-player.lock .vjs-lock-overlay,
.trailer-player.lock .vjs-lock-overlay,
.vjs-player-locked .vjs-lock-overlay {
    position: static !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    display: block !important;
}

/* Full-screen Shield covering the entire player area to intercept all clicks/taps */
.player-lock-shield {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1001 !important;
    background: transparent !important;
    cursor: default !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
    user-select: none !important;
}

.player-lock-hint-pill {
    background: rgba(14, 20, 32, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1.5px solid rgba(0, 230, 118, 0.75) !important;
    color: #ffffff !important;
    padding: 12px 26px !important;
    border-radius: 40px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 230, 118, 0.35) !important;
    pointer-events: none !important;
    user-select: none !important;
    animation: playerLockHintFade 0.25s ease-out !important;
    direction: rtl !important;
}

.player-lock-hint-pill i {
    color: #00E676 !important;
    font-size: 18px !important;
}

@keyframes playerLockHintFade {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.anime-player.lock .lock-player,
.trailer-player.lock .lock-player,
.vjs-player-locked .lock-player {
    position: absolute !important;
    top: 24px !important;
    left: 24px !important;
    z-index: 1002 !important;
    pointer-events: auto !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: rgba(14, 20, 32, 0.9) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 2px solid rgba(0, 230, 118, 0.8) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 18px rgba(0, 230, 118, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
}

.anime-player.lock .lock-player:hover,
.trailer-player.lock .lock-player:hover,
.vjs-player-locked .lock-player:hover {
    border-color: #00E676 !important;
    transform: scale(1.08) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 26px rgba(0, 230, 118, 0.6) !important;
}

.anime-player.lock .lock-player a,
.trailer-player.lock .lock-player a,
.vjs-player-locked .lock-player a {
    color: #00E676 !important;
    font-size: 19px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.anime-player .lock-video {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.anime-player.lock .lock-video {
    display: block;
}



/* --------------------------------------------------------------------------
   Fullscreen Mode
   -------------------------------------------------------------------------- */
.video-js.vjs-fullscreen,
.anime-player:fullscreen,
.anime-player:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    border: none !important;
}

/* --------------------------------------------------------------------------
   Trailer Player Rules:
   1) BEFORE PLAYING: Single original green play button in center
   2) WHEN PLAYING: Matched pair of green Stop/Play & Fullscreen buttons in center
   3) FULLSCREEN: Full-size video with standard bottom controls
   -------------------------------------------------------------------------- */
.trailer-player {
    width: 200px !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45) !important;
    position: relative !important;
}

.trailer-player .video-js {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
}

/* ==========================================================================
   1) BEFORE PLAYING (:not(.vjs-has-started))
   - Show ONLY the original centered single green big play button
   - Hide the control bar completely
   ========================================================================== */
.trailer-player .video-js:not(.vjs-has-started) .vjs-big-play-button {
    display: flex !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    background: rgba(11, 17, 27, 0.88) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 2px solid rgba(0, 230, 118, 0.8) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 230, 118, 0.4) !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 15 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.trailer-player .video-js:not(.vjs-has-started) .vjs-big-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1) !important;
    background: rgba(11, 17, 27, 0.96) !important;
    border-color: #00E676 !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.8), 0 0 32px rgba(0, 230, 118, 0.6) !important;
}

.trailer-player .video-js:not(.vjs-has-started) .vjs-big-play-button .vjs-icon-placeholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.trailer-player .video-js:not(.vjs-has-started) .vjs-big-play-button .vjs-icon-placeholder:before {
    content: "\f04b" !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-weight: 900 !important;
    font-size: 22px !important;
    color: #00E676 !important;
    line-height: 1 !important;
    position: static !important;
    margin-left: 3px !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure control bar is completely hidden BEFORE video has started */
.trailer-player .video-js:not(.vjs-has-started) .vjs-control-bar {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ==========================================================================
   2) WHEN PLAYING (.vjs-has-started:not(.vjs-fullscreen))
   - Hide the big play button
   - Center the control bar with the matching pair: Stop/Play + Fullscreen
   ========================================================================== */
.trailer-player .video-js.vjs-has-started .vjs-big-play-button {
    display: none !important;
}

/* Hide all auxiliary controls in preview mode so nothing overflows */
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-control-bar > *:not(.vjs-play-control):not(.vjs-fullscreen-control),
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-progress-control,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-volume-panel,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-time-control,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-current-time-display,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-time-divider,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-duration-display,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-custom-control-spacer,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-remaining-time,
.trailer-player .video-js:not(.vjs-fullscreen) .quality-player,
.trailer-player .video-js:not(.vjs-fullscreen) .lock-player,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-playback-rate,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-prev-overlay,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-next-overlay {
    display: none !important;
}

/* Centered 2-button floating bar in the exact center (Strictly side-by-side row!) */
.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: max-content !important;
    height: auto !important;
    gap: 16px !important;
    white-space: nowrap !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 15 !important;
    transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

/* Fade out when video is actively playing and mouse is idle; reveal on hover or when paused (استپ) */
.trailer-player .video-js.vjs-has-started.vjs-playing.vjs-user-inactive:not(:hover) .vjs-control-bar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.trailer-player .video-js.vjs-has-started .vjs-control-bar {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Matched Pair: Perfectly coordinated luxury green circular buttons side by side */
.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar button.vjs-button.vjs-play-control,
.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar button.vjs-button.vjs-fullscreen-control {
    display: inline-flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border-radius: 50% !important;
    background: rgba(11, 17, 27, 0.88) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 2px solid rgba(0, 230, 118, 0.8) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 16px rgba(0, 230, 118, 0.35) !important;
    color: #00E676 !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar button.vjs-button.vjs-play-control:hover,
.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar button.vjs-button.vjs-fullscreen-control:hover {
    transform: scale(1.1) !important;
    background: rgba(11, 17, 27, 0.96) !important;
    border-color: #00E676 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 230, 118, 0.6) !important;
}

.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar button.vjs-button.vjs-play-control:active,
.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar button.vjs-button.vjs-fullscreen-control:active {
    transform: scale(0.95) !important;
}

/* Hide screen-reader text inside controls */
.trailer-player .video-js .vjs-control-bar .vjs-control-text {
    display: none !important;
}

/* Exact Icon Centering & Solid Font Awesome Pro 900 weight */
.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar .vjs-icon-placeholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

.trailer-player .video-js.vjs-has-started:not(.vjs-fullscreen) .vjs-control-bar .vjs-icon-placeholder:before {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-family: 'Font Awesome 6 Pro' !important;
    font-weight: 900 !important;
    color: #00E676 !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* 2a) Stop / Pause Icon (when playing - استپ) */
.trailer-player .video-js.vjs-playing:not(.vjs-fullscreen) .vjs-play-control .vjs-icon-placeholder:before,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-play-control.vjs-playing .vjs-icon-placeholder:before {
    content: "\f04c" !important;
    font-size: 16px !important;
    margin-left: 0 !important;
}

/* 2b) Play Icon (when paused / stopped) */
.trailer-player .video-js.vjs-paused:not(.vjs-fullscreen) .vjs-play-control .vjs-icon-placeholder:before,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-play-control:not(.vjs-playing):not(.vjs-ended) .vjs-icon-placeholder:before {
    content: "\f04b" !important;
    font-size: 16px !important;
    margin-left: 2.5px !important;
}

/* 2c) Replay Icon (when ended) */
.trailer-player .video-js.vjs-ended:not(.vjs-fullscreen) .vjs-play-control .vjs-icon-placeholder:before,
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-play-control.vjs-ended .vjs-icon-placeholder:before {
    content: "\f2ea" !important;
    font-size: 16px !important;
    margin: 0 !important;
}

/* 2d) Fullscreen Icon (enter fullscreen) */
.trailer-player .video-js:not(.vjs-fullscreen) .vjs-fullscreen-control .vjs-icon-placeholder:before {
    content: "\f065" !important;
    font-size: 16px !important;
    margin: 0 !important;
}

/* ==========================================================================
   3) FULLSCREEN MODE: Full Window with Bottom Control Bar
   ========================================================================== */
.trailer-player.vjs-fullscreen,
.trailer-player .video-js.vjs-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
}

.trailer-player .video-js.vjs-fullscreen .vjs-control-bar {
    position: absolute !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 0 20px 10px 20px !important;
    background: linear-gradient(0deg, rgba(6, 9, 15, 0.96) 0%, rgba(6, 9, 15, 0.6) 60%, transparent 100%) !important;
    opacity: 0;
    transition: opacity 0.3s ease !important;
}

.trailer-player .video-js.vjs-fullscreen.vjs-user-active .vjs-control-bar,
.trailer-player .video-js.vjs-fullscreen.vjs-paused .vjs-control-bar,
.trailer-player.vjs-fullscreen:hover .vjs-control-bar {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.trailer-player .video-js.vjs-fullscreen .vjs-control-bar .vjs-progress-control,
.trailer-player .video-js.vjs-fullscreen .vjs-control-bar .vjs-volume-panel,
.trailer-player .video-js.vjs-fullscreen .vjs-control-bar .vjs-time-control,
.trailer-player .video-js.vjs-fullscreen .vjs-control-bar .vjs-custom-control-spacer {
    display: flex !important;
}

.trailer-player .video-js.vjs-fullscreen .vjs-control-bar .vjs-play-control,
.trailer-player .video-js.vjs-fullscreen .vjs-control-bar .vjs-fullscreen-control {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}