/**
 * StreamTube Player Enhancements CSS
 * Version: 3.0.0
 * Comprehensive styling for all YouTube-like features
 */

/* ==============================================
   TOAST NOTIFICATIONS
   ============================================== */
.vjs-stpe-toast {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10000;
    white-space: nowrap;
}

.vjs-stpe-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==============================================
   HOTKEYS OVERLAY
   ============================================== */
.vjs-hotkeys-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.vjs-hotkeys-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.vjs-hotkeys-content {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.vjs-hotkeys-content h2 {
    color: #fff;
    font-size: 24px;
    margin: 0 0 24px 0;
    text-align: center;
}

.vjs-hotkeys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.vjs-hotkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.vjs-hotkey-key {
    color: #4a9eff;
    font-weight: 600;
    font-family: monospace;
    font-size: 14px;
}

.vjs-hotkey-action {
    color: #ccc;
    font-size: 14px;
}

.vjs-hotkeys-close {
    width: 100%;
    padding: 12px;
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vjs-hotkeys-close:hover {
    background: #3a8eef;
}

/* ==============================================
   SPEED CONTROL
   ============================================== */
.vjs-speed-button {
    cursor: pointer;
    position: relative;
}

.vjs-speed-button .vjs-icon-placeholder::before {
    content: none;
}

.vjs-speed-button .vjs-icon-placeholder {
    font-size: 14px;
    line-height: 30px;
}

.vjs-speed-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(40, 40, 40, 0.98);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.vjs-speed-menu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-speed-item {
    padding: 11px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.vjs-speed-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.vjs-speed-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 500;
}

.vjs-speed-item.active::after {
    content: '✓';
    color: #fff;
    font-size: 16px;
    margin-left: 12px;
}

/* ==============================================
   LOOP BUTTON
   ============================================== */
.vjs-loop-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-loop-button:hover {
    opacity: 1;
}

.vjs-loop-button.active {
    opacity: 1;
    color: #4a9eff;
}

/* ==============================================
   QUALITY SELECTOR
   ============================================== */
.vjs-quality-button {
    cursor: pointer;
    position: relative;
}

.vjs-quality-button .vjs-icon-placeholder::before {
    content: none;
}

.vjs-quality-button .vjs-icon-placeholder {
    font-size: 13px;
    line-height: 30px;
}

.vjs-quality-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(40, 40, 40, 0.98);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.vjs-quality-menu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-quality-item {
    padding: 11px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.vjs-quality-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.vjs-quality-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 500;
}

.vjs-quality-item.active::after {
    content: '✓';
    color: #fff;
    font-size: 16px;
    margin-left: 12px;
}

/* ==============================================
   VERTICAL VIDEO SUPPORT
   ============================================== */
.vjs-vertical-video {
    margin: 0 auto;
}

/* Desktop constraint - mobile-like width (TikTok/Shorts style) */
.vjs-vertical-video.vjs-vertical-desktop-constrain {
    max-width: 450px !important;
    margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
}

/* Always full width on mobile */
@media (max-width: 768px) {
    .vjs-vertical-video,
    .vjs-vertical-video.vjs-vertical-desktop-constrain {
        max-width: 100% !important;
        box-shadow: none;
        border-radius: 0;
    }
}

/* Tablet size - slightly wider */
@media (min-width: 769px) and (max-width: 1024px) {
    .vjs-vertical-video.vjs-vertical-desktop-constrain {
        max-width: 380px !important;
    }
}

/* Large desktop - keep consistent mobile-like appearance */
@media (min-width: 1440px) {
    .vjs-vertical-video.vjs-vertical-desktop-constrain {
        max-width: 500px !important;
    }
}

/* ==============================================
   DOUBLE TAP SEEK INDICATORS
   ============================================== */
.vjs-seek-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.vjs-seek-indicator.left {
    left: 20px;
}

.vjs-seek-indicator.right {
    right: 20px;
}

.vjs-seek-indicator.show {
    opacity: 1;
}

.vjs-seek-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 8px;
}

.vjs-seek-amount {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* ==============================================
   GESTURE INDICATORS
   ============================================== */
.vjs-gesture-indicator,
.vjs-volume-indicator,
.vjs-longpress-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.vjs-gesture-indicator.show,
.vjs-volume-indicator.show,
.vjs-longpress-indicator.show {
    opacity: 1;
}

/* ==============================================
   PICTURE IN PICTURE BUTTON
   ============================================== */
.vjs-pip-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-pip-button:hover {
    opacity: 1;
}

/* ==============================================
   THEATER MODE
   ============================================== */
.vjs-theater-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-theater-button:hover {
    opacity: 1;
}

.vjs-theater-button.active {
    opacity: 1;
    color: #4a9eff;
}

.vjs-theater-mode {
    width: 100% !important;
    max-width: 100% !important;
    height: 70vh !important;
}

/* ==============================================
   ZOOM FULL SCREEN MODE
   ============================================== */
.vjs-zoom-fullscreen-button {
    cursor: pointer;
    font-size: 1.5em;
    line-height: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3em;
    min-height: 3em;
}

.vjs-zoom-fullscreen-button .vjs-icon-placeholder {
    font-size: 1.8em;
    font-family: Arial, sans-serif;
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure button is visible and clickable on mobile */
@media (max-width: 768px) {
    .vjs-zoom-fullscreen-button {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.2em;
    }
    
    .vjs-zoom-fullscreen-button .vjs-icon-placeholder {
        font-size: 1.5em;
    }
}

/* ==============================================
   FLOATING ZOOM BUTTON FOR MOBILE
   ============================================== */
.vjs-zoom-floating-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: rgba(40, 40, 40, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    z-index: 99998;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vjs-zoom-floating-btn:active {
    transform: scale(0.95);
    background: rgba(50, 50, 50, 0.95);
}

.vjs-zoom-floating-btn.active {
    background: rgba(62, 166, 255, 0.95);
    border-color: #3ea6ff;
    box-shadow: 0 4px 25px rgba(62, 166, 255, 0.5);
}

.vjs-zoom-floating-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

/* Hide floating button on desktop */
@media (min-width: 769px) {
    .vjs-zoom-floating-btn {
        display: none !important;
    }
}

/* When zoom is active, move button to top right */
.vjs-zoom-fullscreen-mode ~ .vjs-zoom-floating-btn,
body:has(.vjs-zoom-fullscreen-mode) .vjs-zoom-floating-btn {
    top: 20px;
    right: 20px;
    bottom: auto;
    z-index: 99999;
}

.vjs-zoom-fullscreen-button:hover {
    color: #4a9eff;
}

.vjs-zoom-fullscreen-button.active {
    color: #4a9eff;
}

.vjs-zoom-fullscreen-button.active .vjs-icon-placeholder {
    color: #4a9eff;
}

.vjs-zoom-fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.vjs-zoom-fullscreen-mode .video-js {
    width: 100% !important;
    height: 100% !important;
}

.vjs-zoom-fullscreen-mode video {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
}

/* Hide all extra UI elements in zoom mode */
.vjs-zoom-fullscreen-mode .vjs-control-bar {
    opacity: 0;
    transition: opacity 0.3s;
}

.vjs-zoom-fullscreen-mode:hover .vjs-control-bar {
    opacity: 1;
}

/* ==============================================
   MINI PLAYER
   ============================================== */
.vjs-mini-player-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-mini-player-button:hover {
    opacity: 1;
}

.vjs-mini-player-button.active {
    opacity: 1;
    color: #4a9eff;
}

.vjs-mini-player {
    position: fixed !important;
    bottom: 20px;
    right: 20px;
    width: 320px !important;
    height: 180px !important;
    z-index: 9999;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
}

.vjs-mini-expand {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.vjs-mini-expand:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* ==============================================
   SLEEP TIMER
   ============================================== */
.vjs-sleep-timer-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: relative;
}

.vjs-sleep-timer-button:hover {
    opacity: 1;
}

.vjs-sleep-timer-button.active {
    opacity: 1;
    color: #4a9eff;
}

.vjs-sleep-timer-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(40, 40, 40, 0.98);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.vjs-sleep-timer-menu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-sleep-timer-item {
    padding: 11px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.vjs-sleep-timer-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.vjs-sleep-timer-item.active {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 500;
}

.vjs-sleep-timer-item.active::after {
    content: '✓';
    color: #fff;
    font-size: 16px;
    margin-left: 12px;
}

/* ==============================================
   SHARE BUTTON
   ============================================== */
.vjs-share-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-share-button:hover {
    opacity: 1;
}

/* ==============================================
   AMBIENT MODE
   ============================================== */
.vjs-ambient-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-ambient-button:hover {
    opacity: 1;
}

.vjs-ambient-button.active {
    opacity: 1;
    color: #4a9eff;
}

.vjs-ambient-canvas {
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    z-index: -1;
    display: none;
    filter: blur(80px);
    opacity: 0.6;
}

/* ==============================================
   SUBTITLES BUTTON
   ============================================== */
.vjs-subtitles-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-subtitles-button:hover {
    opacity: 1;
}

.vjs-subtitles-button.vjs-subtitles-active {
    opacity: 1;
    color: #4a9eff;
}

.vjs-subtitles-button .vjs-icon-placeholder::before {
    content: "CC";
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

/* ==============================================
   ENHANCED SUBTITLES
   ============================================== */
.vjs-enhanced-subtitles {
    font-size: 20px !important;
}

.vjs-enhanced-subtitles .vjs-text-track-cue {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 4px;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.vjs-text-track-display {
    pointer-events: none;
}

/* Subtitle size variations */
.vjs-enhanced-subtitles.vjs-subtitle-small .vjs-text-track-cue {
    font-size: 16px !important;
}

.vjs-enhanced-subtitles.vjs-subtitle-medium .vjs-text-track-cue {
    font-size: 20px !important;
}

.vjs-enhanced-subtitles.vjs-subtitle-large .vjs-text-track-cue {
    font-size: 24px !important;
}

.vjs-enhanced-subtitles.vjs-subtitle-extra-large .vjs-text-track-cue {
    font-size: 28px !important;
}

/* ==============================================
   STATS FOR NERDS
   ============================================== */
.vjs-stats-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-stats-button:hover {
    opacity: 1;
}

.vjs-stats-button.active {
    opacity: 1;
    color: #4a9eff;
}

.vjs-stats-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.8;
    font-family: monospace;
    z-index: 100;
    max-width: 300px;
}

.vjs-stats-overlay div {
    margin-bottom: 4px;
}

.vjs-stats-overlay strong {
    color: #4a9eff;
}

/* ==============================================
   SCREENSHOT BUTTON
   ============================================== */
.vjs-screenshot-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-screenshot-button:hover {
    opacity: 1;
}

/* ==============================================
   DOWNLOAD BUTTON
   ============================================== */
.vjs-download-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-download-button:hover {
    opacity: 1;
}

/* ==============================================
   BUFFER INDICATOR
   ============================================== */
.vjs-buffer-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.vjs-buffer-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==============================================
   CHAPTERS BUTTON
   ============================================== */
.vjs-chapters-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: relative;
}

.vjs-chapters-button:hover {
    opacity: 1;
}

.vjs-chapters-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(40, 40, 40, 0.98);
    border-radius: 12px;
    padding: 8px;
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.vjs-chapters-menu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-chapter-item {
    padding: 12px 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 8px;
    margin-bottom: 4px;
}

.vjs-chapter-item:last-child {
    margin-bottom: 0;
}

.vjs-chapter-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.vjs-chapter-time {
    color: #aaa;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
}

.vjs-chapter-title {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* ==============================================
   MOBILE RESPONSIVENESS
   ============================================== */
@media (max-width: 768px) {
    .vjs-mini-player {
        width: 250px !important;
        height: 140px !important;
        bottom: 10px;
        right: 10px;
    }

    .vjs-stpe-toast {
        font-size: 14px;
        padding: 10px 20px;
    }

    .vjs-seek-indicator {
        padding: 15px;
    }

    .vjs-seek-icon {
        font-size: 36px;
    }

    .vjs-seek-amount {
        font-size: 14px;
    }

    .vjs-hotkeys-content {
        padding: 24px;
    }

    .vjs-hotkeys-grid {
        grid-template-columns: 1fr;
    }

    .vjs-stats-overlay {
        font-size: 11px;
        max-width: 220px;
    }

    .vjs-chapters-menu {
        max-width: 90vw;
    }
}

/* ==============================================
   SMOOTH TRANSITIONS
   ============================================== */
.video-js .vjs-control-bar {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-js.vjs-user-inactive .vjs-control-bar {
    opacity: 0;
    transform: translateY(100%);
}

.video-js.vjs-user-active .vjs-control-bar {
    opacity: 1;
    transform: translateY(0);
}

.video-js .vjs-big-play-button {
    transition: all 0.3s ease;
}

.video-js:hover .vjs-big-play-button {
    transform: scale(1.1);
}

/* ==============================================
   CUSTOM SCROLLBAR FOR MENUS
   ============================================== */
.vjs-speed-menu::-webkit-scrollbar,
.vjs-quality-menu::-webkit-scrollbar,
.vjs-chapters-menu::-webkit-scrollbar,
.vjs-hotkeys-content::-webkit-scrollbar {
    width: 8px;
}

.vjs-speed-menu::-webkit-scrollbar-track,
.vjs-quality-menu::-webkit-scrollbar-track,
.vjs-chapters-menu::-webkit-scrollbar-track,
.vjs-hotkeys-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.vjs-speed-menu::-webkit-scrollbar-thumb,
.vjs-quality-menu::-webkit-scrollbar-thumb,
.vjs-chapters-menu::-webkit-scrollbar-thumb,
.vjs-hotkeys-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.vjs-speed-menu::-webkit-scrollbar-thumb:hover,
.vjs-quality-menu::-webkit-scrollbar-thumb:hover,
.vjs-chapters-menu::-webkit-scrollbar-thumb:hover,
.vjs-hotkeys-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==============================================
   ACCESSIBILITY
   ============================================== */
.vjs-control:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* =============================================
   A-B LOOP BUTTON
   ============================================= */
.vjs-ab-loop-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    font-size: 13px;
    font-weight: 600;
}

.vjs-ab-loop-button:hover {
    opacity: 1;
}

.vjs-ab-loop-button.vjs-ab-point-a {
    color: #f59e0b;
}

.vjs-ab-loop-button.vjs-ab-looping {
    color: #10b981;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* =============================================
   SKIP INTRO BUTTON
   ============================================= */
.vjs-skip-intro {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 2px solid #4a9eff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.vjs-skip-intro.show {
    opacity: 1;
    transform: translateX(0);
}

.vjs-skip-intro:hover {
    background: #4a9eff;
    transform: translateY(-2px);
}

/* =============================================
   REPLAY BUTTON
   ============================================= */
.vjs-replay-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-replay-button:hover {
    opacity: 1;
}

/* =============================================
   THUMBNAIL PREVIEW
   ============================================= */
.vjs-thumbnail-preview {
    position: absolute;
    bottom: 100%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.vjs-thumbnail-preview.show {
    opacity: 1;
}

.vjs-thumbnail-image {
    width: 160px;
    height: 90px;
    background: #333;
    border-radius: 4px;
    margin-bottom: 4px;
}

.vjs-thumbnail-time {
    color: #fff;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}

/* =============================================
   FILTERS BUTTON & MENU
   ============================================= */
.vjs-filters-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: relative;
}

.vjs-filters-button:hover {
    opacity: 1;
}

.vjs-filters-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(40, 40, 40, 0.98);
    border-radius: 12px;
    padding: 16px;
    min-width: 260px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.vjs-filters-menu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-filter-control {
    margin-bottom: 12px;
}

.vjs-filter-control label {
    display: block;
    color: #fff;
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 600;
}

.vjs-filter-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
}

.vjs-filter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
}

.vjs-filter-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    border: none;
}

.vjs-filter-value {
    float: right;
    color: #4a9eff;
    font-size: 12px;
    font-weight: 600;
}

.vjs-filter-reset {
    width: 100%;
    padding: 8px;
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.vjs-filter-reset:hover {
    background: #3a8eef;
}

/* =============================================
   ROTATE BUTTON
   ============================================= */
.vjs-rotate-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-rotate-button:hover {
    opacity: 1;
}

/* =============================================
   FLIP BUTTON
   ============================================= */
.vjs-flip-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-flip-button:hover {
    opacity: 1;
}

.vjs-flip-button.active {
    color: #4a9eff;
    opacity: 1;
}

/* =============================================
   QR CODE MODAL
   ============================================= */
.vjs-qr-button {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.vjs-qr-button:hover {
    opacity: 1;
}

.vjs-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vjs-qr-modal.show {
    opacity: 1;
}

.vjs-qr-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    position: relative;
    max-width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.vjs-qr-content h3 {
    margin: 0 0 16px;
    font-size: 20px;
    color: #333;
}

.vjs-qr-content img {
    display: block;
    margin: 0 auto 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vjs-qr-content p {
    margin: 0;
    color: #666;
    font-size: 12px;
    word-break: break-all;
}

.vjs-qr-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vjs-qr-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* =============================================
   Dark Mode Support
   ============================================= */
@media (prefers-color-scheme: dark) {
    .vjs-stpe-toast {
        background: rgba(30, 30, 30, 0.95);
    }

    .vjs-hotkeys-content {
        background: #2a2a2a;
    }

    .vjs-speed-menu,
    .vjs-quality-menu,
    .vjs-sleep-timer-menu,
    .vjs-chapters-menu,
    .vjs-filters-menu {
        background: rgba(30, 30, 30, 0.98);
    }

    .vjs-qr-content {
        background: #2a2a2a;
    }

    .vjs-qr-content h3 {
        color: #fff;
    }

    .vjs-qr-content p {
        color: #ccc;
    }

    .vjs-qr-close {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .vjs-qr-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* ==============================================
   GESTURE DRAWING CANVAS
   ============================================== */
.vjs-draw-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    display: none;
    cursor: crosshair;
    pointer-events: all;
}

.vjs-draw-button {
    cursor: pointer;
}

.vjs-draw-button:before {
    content: '✏️';
    font-size: 18px;
}

.vjs-draw-button.vjs-draw-active {
    background: rgba(255, 0, 0, 0.3);
}

.vjs-draw-clear {
    position: absolute;
    bottom: 80px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    font-size: 12px;
}

.vjs-draw-clear:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* ==============================================
   PLAYBACK HISTORY HEATMAP
   ============================================== */
.vjs-playback-heatmap {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    pointer-events: none;
    z-index: 2;
}

.vjs-heatmap-bar {
    position: absolute;
    height: 100%;
    background: linear-gradient(to top, rgba(255, 165, 0, 0.6), rgba(255, 215, 0, 0.8));
    pointer-events: none;
}

/* ==============================================
   SKIP CREDITS OVERLAY
   ============================================== */
.vjs-skip-credits {
    position: absolute;
    bottom: 120px;
    right: 20px;
    z-index: 9;
    animation: slideInRight 0.3s ease;
}

.vjs-skip-credits-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.vjs-skip-credits-content span {
    color: #fff;
    font-size: 13px;
}

.vjs-skip-credits-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vjs-skip-credits-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==============================================
   VIDEO BOOKMARKS
   ============================================== */
.vjs-bookmark-button {
    cursor: pointer;
}

.vjs-bookmark-button:before {
    content: '🔖';
    font-size: 18px;
}

.vjs-bookmark-menu {
    position: absolute;
    bottom: 50px;
    right: 0;
    min-width: 300px;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    padding: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.vjs-bookmark-menu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-bookmark-add {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.vjs-bookmark-add:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vjs-bookmark-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.vjs-bookmark-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vjs-bookmark-time {
    color: #4CAF50;
    font-weight: 600;
    font-size: 12px;
    min-width: 50px;
    cursor: pointer;
}

.vjs-bookmark-note {
    color: white;
    flex: 1;
    font-size: 13px;
    cursor: pointer;
}

.vjs-bookmark-delete {
    background: rgba(255, 0, 0, 0.3);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
}

.vjs-bookmark-delete:hover {
    background: rgba(255, 0, 0, 0.6);
    transform: scale(1.1);
}

.vjs-bookmark-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 20px;
    font-size: 13px;
}

/* ==============================================
   SPEED PRESETS
   ============================================== */
.vjs-speed-presets {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.video-js:hover .vjs-speed-presets {
    opacity: 1;
    pointer-events: all;
}

.vjs-speed-preset-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.vjs-speed-preset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vjs-speed-preset-btn.active {
    background: #FF0000;
    border-color: #FF0000;
}

/* ==============================================
   CLIP EXTRACTOR
   ============================================== */
.vjs-clip-button {
    cursor: pointer;
}

.vjs-clip-button:before {
    content: '✂️';
    font-size: 18px;
}

.vjs-clip-panel {
    position: absolute;
    bottom: 50px;
    right: 0;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    padding: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.vjs-clip-panel.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-clip-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vjs-clip-mark-start,
.vjs-clip-mark-end {
    padding: 8px 16px;
    background: rgba(0, 150, 255, 0.3);
    color: white;
    border: 1px solid rgba(0, 150, 255, 0.5);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.vjs-clip-mark-start:hover,
.vjs-clip-mark-end:hover {
    background: rgba(0, 150, 255, 0.5);
}

.vjs-clip-times {
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 12px;
    padding: 8px 0;
}

.vjs-clip-extract {
    padding: 10px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.vjs-clip-extract:hover:not(:disabled) {
    background: #45a049;
    transform: scale(1.02);
}

.vjs-clip-extract:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* ==============================================
   SUBTITLE SEARCH
   ============================================== */
.vjs-subtitle-search-button {
    cursor: pointer;
}

.vjs-subtitle-search-button:before {
    content: '🔍';
    font-size: 18px;
}

.vjs-subtitle-search-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 70%;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.vjs-subtitle-search-panel.show {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.vjs-subtitle-search-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.vjs-subtitle-search-input {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
}

.vjs-subtitle-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.vjs-subtitle-search-close {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.vjs-subtitle-search-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vjs-subtitle-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.vjs-search-result-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.vjs-search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vjs-search-result-time {
    color: #2196F3;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.vjs-search-result-text {
    color: white;
    font-size: 13px;
    line-height: 1.4;
}

.vjs-search-result-text mark {
    background: #FFEB3B;
    color: #000;
    padding: 2px 4px;
    border-radius: 2px;
}

.vjs-search-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 40px 20px;
    font-size: 14px;
}

/* ==============================================
   MOBILE RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    .vjs-bookmark-menu,
    .vjs-clip-panel {
        min-width: 250px;
        max-width: 90vw;
    }

    .vjs-subtitle-search-panel {
        width: 95%;
        max-height: 80%;
    }

    .vjs-speed-presets {
        bottom: 70px;
        gap: 6px;
        padding: 6px 10px;
    }

    .vjs-speed-preset-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .vjs-skip-credits {
        bottom: 90px;
        right: 10px;
    }
}

/* ==============================================
   AUDIO EQUALIZER
   ============================================== */
.vjs-eq-button:before {
    content: '🎚️';
    font-size: 18px;
}

.vjs-eq-panel {
    position: absolute;
    bottom: 50px;
    right: 0;
    min-width: 280px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    padding: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.vjs-eq-panel.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-eq-header {
    color: white;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 14px;
}

.vjs-eq-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vjs-eq-slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vjs-eq-slider label {
    color: white;
    font-size: 12px;
    min-width: 50px;
}

.vjs-eq-slider input[type="range"] {
    flex: 1;
    height: 4px;
}

.vjs-eq-value {
    color: #4CAF50;
    font-size: 11px;
    min-width: 45px;
    text-align: right;
}

.vjs-eq-reset {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    margin-top: 5px;
}

.vjs-eq-reset:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==============================================
   ZOOM CONTROLS
   ============================================== */
.vjs-zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 20px;
    z-index: 10;
}

.vjs-zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
}

.vjs-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vjs-zoom-level {
    color: white;
    font-size: 13px;
    font-weight: 600;
    min-width: 45px;
    text-align: center;
}

.vjs-zoom-reset {
    width: auto;
    padding: 0 12px;
    font-size: 12px;
}

/* ==============================================
   WATCH PARTY
   ============================================== */
.vjs-party-button:before {
    content: '👥';
    font-size: 18px;
}

.vjs-party-panel {
    position: absolute;
    bottom: 50px;
    right: 0;
    min-width: 320px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    padding: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.vjs-party-panel.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.vjs-party-header {
    color: white;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

.vjs-party-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vjs-party-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin: 0;
}

.vjs-party-code {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    font-family: monospace;
}

.vjs-party-create,
.vjs-party-join {
    padding: 10px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.vjs-party-create:hover,
.vjs-party-join:hover {
    background: #45a049;
}

.vjs-party-join {
    background: #2196F3;
}

.vjs-party-join:hover {
    background: #1976D2;
}

.vjs-party-active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

/* ==============================================
   LIVE CHAT
   ============================================== */
.vjs-chat-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    z-index: 9;
    transition: transform 0.3s ease;
}

.vjs-chat-panel.minimized {
    transform: translateX(280px);
}

.vjs-chat-header {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vjs-chat-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.vjs-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vjs-chat-message {
    color: white;
    font-size: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.vjs-chat-message strong {
    color: #4CAF50;
}

.vjs-chat-input-area {
    padding: 10px;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.vjs-chat-input {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 12px;
}

.vjs-chat-send {
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

/* ==============================================
   VOICE COMMANDS
   ============================================== */
.vjs-voice-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 100;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==============================================
   INTERACTIVE ANNOTATIONS
   ============================================== */
.vjs-annotation {
    position: absolute;
    z-index: 8;
    animation: fadeIn 0.3s ease;
}

.vjs-annotation-content {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ==============================================
   AUTOPLAY COUNTDOWN
   ============================================== */
.vjs-autoplay-countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.vjs-countdown-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.vjs-countdown-content p {
    color: white;
    font-size: 18px;
    margin: 0 0 15px 0;
}

.vjs-countdown-timer {
    color: #4CAF50;
    font-weight: bold;
    font-size: 24px;
}

.vjs-countdown-cancel {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.vjs-countdown-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==============================================
   MULTI-ANGLE SELECTOR
   ============================================== */
.vjs-angle-selector {
    position: absolute;
    top: 60px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.vjs-angle-selector button {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.vjs-angle-selector button:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ==============================================
   CONTENT WARNING
   ============================================== */
.vjs-content-warning {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    animation: warningPulse 0.5s ease;
}

.vjs-warning-content {
    background: rgba(255, 152, 0, 0.95);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.5);
}

@keyframes warningPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ==============================================
   AI SUMMARY MODAL
   ============================================== */
.vjs-summary-button:before {
    content: '🤖';
    font-size: 18px;
}

.vjs-summary-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.vjs-summary-content {
    background: rgba(30, 30, 30, 0.98);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
}

.vjs-summary-content h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.vjs-summary-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.vjs-summary-close {
    padding: 10px 24px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

/* ==============================================
   BUTTON ACTIVE STATES
   ============================================== */
.vjs-stabilize-button.vjs-stabilize-active,
.vjs-hdr-button.vjs-hdr-active,
.vjs-blur-button.vjs-blur-active,
.vjs-360-button.vjs-360-active {
    background: rgba(76, 175, 80, 0.3);
}

/* ==============================================
   THUMBNAIL GRID PREVIEW
   ============================================== */
.vjs-thumbnail-grid-preview {
    position: absolute;
    bottom: 100%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    pointer-events: none;
}

/* ==============================================
   MOBILE MODAL WRAPPER (Full-screen on mobile)
   ============================================== */
.vjs-mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.vjs-mobile-modal.show {
    opacity: 1;
    pointer-events: all;
}

.vjs-mobile-modal-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vjs-mobile-modal-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.vjs-mobile-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.vjs-mobile-modal-close:active {
    background: rgba(255, 255, 255, 0.1);
}

.vjs-mobile-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.vjs-mobile-option {
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.vjs-mobile-option:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

.vjs-mobile-option-label {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.vjs-mobile-option.active {
    background: rgba(74, 158, 255, 0.3);
    border: 2px solid #4a9eff;
}

.vjs-mobile-option.active .vjs-mobile-option-label {
    color: #4a9eff;
}

.vjs-mobile-option-check {
    color: #4a9eff;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.2s;
}

.vjs-mobile-option.active .vjs-mobile-option-check {
    opacity: 1;
}

/* ==============================================
   MOBILE RESPONSIVE FOR NEW FEATURES
   ============================================== */
@media (max-width: 768px) {
    /* Hide desktop-only buttons and features on mobile */
    .vjs-theater-button,
    .vjs-ambient-button,
    .vjs-mini-player-button,
    .vjs-stats-button,
    .vjs-screenshot-button,
    .vjs-download-button,
    .vjs-ab-loop-button,
    .vjs-instant-replay-button,
    .vjs-bookmark-button,
    .vjs-frame-button,
    .vjs-gesture-draw-button,
    .vjs-history-graph-button,
    .vjs-clip-button,
    .vjs-eq-button,
    .vjs-stabilization-button,
    .vjs-hdr-button,
    .vjs-motion-blur-button,
    .vjs-party-button,
    .vjs-chat-button,
    .vjs-voice-button,
    .vjs-annotation-button,
    .vjs-offline-button,
    .vjs-multi-angle-button,
    .vjs-translate-button,
    .vjs-thumbnail-grid-button,
    .vjs-ai-summary-button,
    .vjs-qr-button,
    .vjs-share-button,
    .vjs-watch-history-button,
    .vjs-hotkeys-button {
        display: none !important;
    }
    
    /* Hide desktop hover overlays */
    .vjs-ambient-canvas,
    .vjs-hotkeys-overlay,
    .vjs-stats-overlay,
    .vjs-thumbnail-preview {
        display: none !important;
    }
    
    /* Convert all dropdown menus to full-screen modals on mobile */
    .vjs-speed-menu,
    .vjs-quality-menu,
    .vjs-sleep-timer-menu,
    .vjs-chapters-menu,
    .vjs-bookmark-menu,
    .vjs-clip-panel,
    .vjs-filters-menu,
    .vjs-eq-panel,
    .vjs-party-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .vjs-speed-menu.show,
    .vjs-quality-menu.show,
    .vjs-sleep-timer-menu.show,
    .vjs-chapters-menu.show,
    .vjs-bookmark-menu.show,
    .vjs-clip-panel.show,
    .vjs-filters-menu.show,
    .vjs-eq-panel.show,
    .vjs-party-panel.show {
        transform: none !important;
    }

    /* Add header to mobile menus */
    .vjs-speed-menu::before,
    .vjs-quality-menu::before,
    .vjs-sleep-timer-menu::before {
        content: attr(data-title);
        display: block;
        padding: 20px;
        background: rgba(255, 255, 255, 0.05);
        color: white;
        font-size: 18px;
        font-weight: 600;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .vjs-speed-menu::before {
        content: 'Playback Speed';
    }

    .vjs-quality-menu::before {
        content: 'Video Quality';
    }

    .vjs-sleep-timer-menu::before {
        content: 'Sleep Timer';
    }

    /* Make menu items larger and more touch-friendly */
    .vjs-speed-item,
    .vjs-quality-item,
    .vjs-sleep-timer-item {
        padding: 20px 24px !important;
        font-size: 16px !important;
        min-height: 60px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .vjs-speed-item:active,
    .vjs-quality-item:active,
    .vjs-sleep-timer-item:active {
        background: rgba(255, 255, 255, 0.2) !important;
    }

    .vjs-speed-item.active,
    .vjs-quality-item.active,
    .vjs-sleep-timer-item.active {
        background: rgba(74, 158, 255, 0.3) !important;
        color: #4a9eff !important;
        font-weight: 600;
        position: relative;
    }

    .vjs-speed-item.active::after,
    .vjs-quality-item.active::after,
    .vjs-sleep-timer-item.active::after {
        content: '✓';
        position: absolute;
        right: 24px;
        font-size: 20px;
        color: #4a9eff;
    }

    /* Filters menu mobile optimization */
    .vjs-filters-menu {
        padding: 20px !important;
    }

    .vjs-filters-header {
        padding: 20px !important;
        font-size: 18px !important;
    }

    .vjs-filter-slider {
        padding: 20px 0 !important;
    }

    .vjs-filter-slider label {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    .vjs-filter-slider input[type="range"] {
        height: 8px !important;
    }

    .vjs-filter-value {
        font-size: 16px !important;
    }

    /* Chapters menu mobile */
    .vjs-chapters-menu {
        padding: 0 !important;
    }

    .vjs-chapter-item {
        padding: 20px 24px !important;
        min-height: 70px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .vjs-chapter-time {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .vjs-chapter-title {
        font-size: 15px !important;
    }

    /* Bookmark menu mobile */
    .vjs-bookmark-add {
        margin: 20px !important;
        padding: 18px !important;
        font-size: 16px !important;
    }

    .vjs-bookmark-item {
        padding: 18px 24px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Chat panel mobile */
    .vjs-chat-panel {
        width: 100% !important;
    }

    /* Equalizer panel mobile */
    .vjs-eq-header,
    .vjs-party-header {
        padding: 20px !important;
        font-size: 18px !important;
        background: rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .vjs-eq-controls,
    .vjs-party-content {
        padding: 20px !important;
    }

    .vjs-eq-slider {
        padding: 16px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Subtitle search mobile */
    .vjs-subtitle-search-panel {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }

    .vjs-subtitle-search-panel.show {
        transform: translate(-50%, -50%) scale(1) !important;
    }

    .vjs-subtitle-search-header {
        padding: 20px !important;
    }

    .vjs-subtitle-search-input {
        padding: 14px !important;
        font-size: 16px !important;
    }

    .vjs-search-result-item {
        padding: 18px !important;
        margin-bottom: 12px !important;
    }

    /* Control bar adjustments */
    .video-js .vjs-control-bar {
        font-size: 16px;
    }

    .video-js .vjs-control {
        width: 44px;
    }

    /* Zoom controls mobile */
    .vjs-zoom-controls {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        gap: 10px;
    }

    .vjs-zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .vjs-zoom-level {
        font-size: 14px;
        min-width: 50px;
    }

    /* Speed presets mobile */
    .vjs-speed-presets {
        bottom: 70px;
        gap: 8px;
        padding: 8px 12px;
    }

    .vjs-speed-preset-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 50px;
    }

    /* Skip credits mobile */
    .vjs-skip-credits {
        bottom: 90px;
        right: 10px;
    }

    /* Angle selector mobile */
    .vjs-angle-selector {
        top: 50px;
        right: 10px;
    }

    .vjs-angle-selector button {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Tooltips and overlays */
    .vjs-stpe-toast {
        padding: 14px 20px;
        font-size: 15px;
        max-width: 90%;
    }

    /* Hide desktop-only elements on mobile */
    .vjs-hotkeys-overlay {
        padding: 20px;
    }

    .vjs-hotkeys-content {
        padding: 24px;
        width: 95%;
    }

    .vjs-hotkeys-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .vjs-hotkey-item {
        padding: 14px;
    }

    /* Disable hover effects on mobile (use active instead) */
    .vjs-speed-item:hover,
    .vjs-quality-item:hover,
    .vjs-sleep-timer-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    /* Mobile fullscreen hint animation */
    @keyframes fadeOut {
        0% { opacity: 1; }
        70% { opacity: 1; }
        100% { opacity: 0; }
    }

    /* Video modal responsive adjustments */
    .vjs-video-modal-overlay .vjs-video-modal-container {
        width: 95% !important;
        height: 90% !important;
    }

    .vjs-video-modal-overlay .vjs-video-modal-header {
        padding: 12px 16px !important;
    }

    .vjs-video-modal-overlay .vjs-video-modal-title {
        font-size: 16px !important;
    }

    .vjs-video-modal-overlay .vjs-video-modal-close {
        width: 36px !important;
        height: 36px !important;
        font-size: 28px !important;
    }
}

/* ==============================================
   MOBILE LANDSCAPE OPTIMIZATIONS
   ============================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .vjs-mobile-modal-content {
        padding: 12px 20px;
    }

    .vjs-mobile-option {
        padding: 14px 20px;
        min-height: 50px;
    }

    .vjs-speed-item,
    .vjs-quality-item,
    .vjs-sleep-timer-item {
        padding: 16px 24px !important;
        min-height: 50px;
    }
}

/* ==============================================
   TOUCH IMPROVEMENTS
   ============================================== */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch devices */
    .video-js button {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover states on touch devices */
    .vjs-control:hover {
        background: none;
    }

    /* Add active state feedback */
    .vjs-control:active {
        background: rgba(255, 255, 255, 0.2);
    }
}
