/* ==============================================
   FLOATING ZOOM BUTTON (Mobile)
   ============================================== */
.stps-zoom-btn {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 65px;
    height: 65px;
    background: rgba(30, 30, 30, 0.95);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 99998;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    font-family: Arial, sans-serif;
}

.stps-zoom-btn:active {
    transform: scale(0.9);
}

.stps-zoom-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #fff;
    box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6);
    }
    50% {
        box-shadow: 0 8px 45px rgba(102, 126, 234, 0.8);
    }
}

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

/* ==============================================
   QUALITY MENU
   ============================================== */
.stps-quality-btn::before {
    content: '⚙️';
    font-size: 1.3em;
}

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

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

.stps-menu-item {
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 14px;
}

.stps-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stps-menu-item:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile: Full-screen quality menu */
@media (max-width: 768px) {
    .stps-quality-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
        padding: 60px 20px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }
    
    .stps-quality-menu::before {
        content: 'Select Quality';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 20px;
        background: rgba(255, 255, 255, 0.05);
        color: white;
        font-size: 20px;
        font-weight: 600;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .stps-menu-item {
        padding: 20px;
        font-size: 18px;
        text-align: center;
        background: rgba(255, 255, 255, 0.05);
        margin-bottom: 8px;
    }
}

/* ==============================================
   SPEED BUTTON (Desktop)
   ============================================== */
.stps-speed-btn {
    font-size: 0.9em;
    min-width: 3em;
}

/* ==============================================
   THEATER BUTTON (Desktop)
   ============================================== */
.stps-theater-btn::before {
    content: '🎭';
    font-size: 1.2em;
}

.stps-theater-btn.active {
    color: #667eea;
}

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

/* Hide theater button on mobile */
@media (max-width: 768px) {
    .stps-theater-btn,
    .stps-speed-btn {
        display: none !important;
    }
}

/* ==============================================
   GENERAL BUTTON STYLING
   ============================================== */
.stps-quality-btn,
.stps-speed-btn,
.stps-theater-btn {
    cursor: pointer;
    transition: all 0.2s;
}

.stps-quality-btn:hover,
.stps-speed-btn:hover,
.stps-theater-btn:hover {
    color: #667eea;
    transform: scale(1.1);
}

/* ==============================================
   MOBILE OPTIMIZATIONS
   ============================================== */
@media (max-width: 768px) {
    /* Larger touch targets */
    .vjs-control {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Hide control bar on mobile when zoomed */
    .stps-zoom-btn.active ~ * .vjs-control-bar {
        opacity: 0.3;
        transition: opacity 0.3s;
    }
    
    .stps-zoom-btn.active ~ * .vjs-control-bar:hover {
        opacity: 1;
    }
}

/* ==============================================
   CLEAN LOADING STATE
   ============================================== */
.video-js {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ==============================================
   SUBTITLE ENHANCEMENTS
   ============================================== */
.vjs-text-track-display {
    pointer-events: none;
}

.vjs-text-track-cue {
    background: rgba(0, 0, 0, 0.9) !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 1.1em !important;
    line-height: 1.5 !important;
}

@media (max-width: 768px) {
    .vjs-text-track-cue {
        font-size: 1em !important;
        padding: 6px 12px !important;
    }
}
