.mtrxf-video-wrapper { position: relative; overflow: hidden; cursor: pointer; transition: all 0.3s ease; width: 100%; display: block; aspect-ratio: 16 / 9; }
.mtrxf-video-thumbnail, .mtrxf-video-iframe-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; margin: 0; padding: 0; }
.mtrxf-thumb-img, .mtrxf-video-iframe-wrapper iframe { width: 100%; height: 100%; object-fit: cover; border: none; }
.mtrxf-play-button, .mtrxf-play-image { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; z-index: 2; }
.mtrxf-play-button i { font-size: 30px; transition: all 0.3s ease; }
.mtrxf-play-button-icon { display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; }
.mtrxf-play-button img { width: 100%; height: 100%; object-fit: contain; }

.mtrxf-video-duration { position: absolute; background-color: rgba(0, 0, 0, 0.85); color: #fff; font-size: 12px; font-family: sans-serif; padding: 4px 8px; border-radius: 4px; z-index: 3; pointer-events: none; line-height: 1; display: inline-flex; align-items: center; gap: 5px; }
.mtrxf-video-duration svg { width: 1em; height: 1em; fill: currentColor; }

/* Base Toolbar Styling */
.mtrxf-player-toolbar { display: flex; justify-content: space-between; align-items: center; background: #16161a; padding: 8px 12px; color: #fff; font-family: sans-serif; font-size: 13px; user-select: none; box-sizing: border-box; }

/* Screen Docked Modes */
.mtrxf-player-toolbar.screen-docked { position: absolute; z-index: 100001; }
.mtrxf-player-toolbar.screen-docked.dock-top { top: 0; left: 0; width: 100%; border-bottom: 1px solid #232329; flex-direction: row; }
.mtrxf-player-toolbar.screen-docked.dock-bottom { bottom: 0; left: 0; width: 100%; border-top: 1px solid #232329; flex-direction: row; }
.mtrxf-player-toolbar.screen-docked.dock-left { top: 0; left: 0; height: 100%; border-right: 1px solid #232329; flex-direction: column; padding: 12px 10px; width: auto; }
.mtrxf-player-toolbar.screen-docked.dock-right { top: 0; right: 0; height: 100%; border-left: 1px solid #232329; flex-direction: column; padding: 12px 10px; width: auto; }

/* Video Docked Mode (Small View) */
.mtrxf-player-toolbar.video-docked { position: relative; width: 100%; border-bottom: 1px solid #232329; border-radius: 6px 6px 0 0; }

.mtrxf-player-toolbar.screen-docked.dock-left .mtrxf-toolbar-modes,
.mtrxf-player-toolbar.screen-docked.dock-right .mtrxf-toolbar-modes { flex-direction: column; width: 100%; align-items: stretch; }
.mtrxf-player-toolbar.screen-docked.dock-left .mtrxf-toolbar-btn,
.mtrxf-player-toolbar.screen-docked.dock-right .mtrxf-toolbar-btn { justify-content: center; }

.mtrxf-player-toolbar.screen-docked.dock-left .mtrxf-toolbar-right,
.mtrxf-player-toolbar.screen-docked.dock-right .mtrxf-toolbar-right { flex-direction: column; margin-top: auto; padding-top: 15px; }
.mtrxf-player-toolbar.screen-docked.dock-left .mtrxf-dock-controls,
.mtrxf-player-toolbar.screen-docked.dock-right .mtrxf-dock-controls { flex-direction: column; border-right: none; border-bottom: 1px solid #3f3f46; padding-right: 0; padding-bottom: 10px; margin-right: 0; margin-bottom: 10px; }

.mtrxf-toolbar-modes { display: flex; gap: 8px; align-items: center; }
.mtrxf-toolbar-btn { background: #232329; border: 1px solid #3f3f46; color: #a1a1aa; padding: 6px; font-size: 13px; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; transition: all 0.2s ease; }
.mtrxf-toolbar-btn:hover, .mtrxf-toolbar-btn.active { background: #dab875; color: #000; border-color: #dab875; }

.mtrxf-toolbar-right { display: flex; align-items: center; }
.mtrxf-dock-controls { display: flex; gap: 4px; align-items: center; border-right: 1px solid #3f3f46; padding-right: 10px; margin-right: 10px; }
.mtrxf-dock-btn { background: transparent; border: 1px solid transparent; color: #a1a1aa; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; font-size: 13px; transition: all 0.2s ease; }
.mtrxf-dock-btn:hover, .mtrxf-dock-btn.active { background: #3f3f46; color: #fff; }
.mtrxf-toolbar-close { font-size: 24px; color: #fff; cursor: pointer; line-height: 1; transition: color 0.2s; padding: 0 4px; }
.mtrxf-toolbar-close:hover { color: #ff4d4d; }

.mtrxf-player-toolbar.is-small-mode { cursor: move; }
.mtrxf-player-toolbar.is-small-mode .mtrxf-dock-controls { display: none !important; }

/* Custom Loading Text & Spinner CSS */
.mtrxf-loader-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 4; }
.mtrxf-spinner { border: 3px solid rgba(255,255,255,0.2); border-top-color: #fff; border-radius: 50%; width: 24px; height: 24px; animation: mtrxf-spin 0.8s linear infinite; }
.mtrxf-loading-text { color: #fff; font-family: sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 1px; }
.mtrxf-loading-text span { animation: mtrxf-blink 1.4s infinite both; }
.mtrxf-loading-text span:nth-child(2) { animation-delay: 0.2s; }
.mtrxf-loading-text span:nth-child(3) { animation-delay: 0.4s; }

@keyframes mtrxf-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes mtrxf-blink { 0% { opacity: 0.2; } 20% { opacity: 1; } 100% { opacity: 0.2; } }

.mtrxf-video-wrapper:hover .mtrxf-hover-zoom-in .mtrxf-thumb-img { transform: scale(1.1); }
.mtrxf-video-wrapper:hover .mtrxf-hover-zoom-out .mtrxf-thumb-img { transform: scale(0.9); }
.mtrxf-video-wrapper:hover .mtrxf-hover-fade .mtrxf-thumb-img { opacity: 0.7; }
.mtrxf-video-wrapper:hover .mtrxf-hover-rotate .mtrxf-thumb-img { transform: rotate(5deg); }